From a1e73fc8d72a5253cae29c9bab5b260ad297c5e2 Mon Sep 17 00:00:00 2001
From: William Grzybowski <wg@FreeBSD.org>
Date: Sat, 8 Jun 2013 11:25:38 -0300
Subject: Fix build in FreeBSD

---
 src/libpiano/crypt.c | 1 -
 src/libpiano/crypt.h | 3 +++
 src/libpiano/piano.h | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

(limited to 'src')

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
-- 
cgit v1.2.3