diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/libpiano/crypt.c | 1 | ||||
-rw-r--r-- | src/libpiano/crypt.h | 3 | ||||
-rw-r--r-- | src/libpiano/piano.h | 3 |
4 files changed, 8 insertions, 1 deletions
@@ -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 |