summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2013-06-08 11:25:38 -0300
committerWilliam Grzybowski <wg@FreeBSD.org>2013-06-08 11:25:38 -0300
commita1e73fc8d72a5253cae29c9bab5b260ad297c5e2 (patch)
tree21558395c9edd26b755f18b89af9038aa67387f4
parent8aa75818da31e69fb71cc558cc9e9a34e50318ab (diff)
downloadpianobar-a1e73fc8d72a5253cae29c9bab5b260ad297c5e2.tar.gz
pianobar-a1e73fc8d72a5253cae29c9bab5b260ad297c5e2.tar.bz2
pianobar-a1e73fc8d72a5253cae29c9bab5b260ad297c5e2.zip
Fix build in FreeBSD
-rw-r--r--Makefile2
-rw-r--r--src/libpiano/crypt.c1
-rw-r--r--src/libpiano/crypt.h3
-rw-r--r--src/libpiano/piano.h3
4 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 77e75f4..2289b3a 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,8 @@ ifeq (${CC},cc)
OS := $(shell uname)
ifeq (${OS},Darwin)
CC=gcc -std=c99
+ else ifeq (${OS},FreeBSD)
+ CC=cc -std=c99
else
CC=c99
endif
diff --git a/src/libpiano/crypt.c b/src/libpiano/crypt.c
index 3f99e93..8886f17 100644
--- a/src/libpiano/crypt.c
+++ b/src/libpiano/crypt.c
@@ -23,7 +23,6 @@ THE SOFTWARE.
#include <string.h>
#include <assert.h>
-#include <gcrypt.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/src/libpiano/crypt.h b/src/libpiano/crypt.h
index 59820e2..baede76 100644
--- a/src/libpiano/crypt.h
+++ b/src/libpiano/crypt.h
@@ -24,6 +24,9 @@ THE SOFTWARE.
#ifndef _CRYPH_H
#define _CRYPT_H
+#ifdef __FreeBSD__
+#define _GCRYPT_IN_LIBGCRYPT
+#endif
#include <gcrypt.h>
char *PianoDecryptString (gcry_cipher_hd_t, const char * const,
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h
index a5eb87f..dc05250 100644
--- a/src/libpiano/piano.h
+++ b/src/libpiano/piano.h
@@ -25,6 +25,9 @@ THE SOFTWARE.
#define _PIANO_H
#include <stdbool.h>
+#ifdef __FreeBSD__
+#define _GCRYPT_IN_LIBGCRYPT
+#endif
#include <gcrypt.h>
/* this is our public API; don't expect this api to be stable as long as