summaryrefslogtreecommitdiff
path: root/src/libpiano
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpiano')
-rw-r--r--src/libpiano/config.h1
-rw-r--r--src/libpiano/piano.c6
-rw-r--r--src/libpiano/piano.h2
-rw-r--r--src/libpiano/request.c5
-rw-r--r--src/libpiano/response.c5
5 files changed, 5 insertions, 14 deletions
diff --git a/src/libpiano/config.h b/src/libpiano/config.h
deleted file mode 100644
index febad25..0000000
--- a/src/libpiano/config.h
+++ /dev/null
@@ -1 +0,0 @@
-#define PACKAGE "libpiano"
diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c
index b519f49..72502f7 100644
--- a/src/libpiano/piano.c
+++ b/src/libpiano/piano.c
@@ -21,10 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#ifndef __FreeBSD__
-#define _BSD_SOURCE /* required by strdup() */
-#define _DARWIN_C_SOURCE /* strdup() on OS X */
-#endif
+#include "../config.h"
#include <stdio.h>
#include <string.h>
@@ -34,7 +31,6 @@ THE SOFTWARE.
#include "piano_private.h"
#include "piano.h"
-#include "config.h"
/* initialize piano handle
* @param piano handle
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h
index f0ba4cf..1a84d4a 100644
--- a/src/libpiano/piano.h
+++ b/src/libpiano/piano.h
@@ -24,6 +24,8 @@ THE SOFTWARE.
#ifndef SRC_LIBPIANO_PIANO_H_MFBT13PN
#define SRC_LIBPIANO_PIANO_H_MFBT13PN
+#include "../config.h"
+
#include <stdbool.h>
#ifdef __FreeBSD__
#define _GCRYPT_IN_LIBGCRYPT
diff --git a/src/libpiano/request.c b/src/libpiano/request.c
index 95ac2d0..02b4b43 100644
--- a/src/libpiano/request.c
+++ b/src/libpiano/request.c
@@ -21,10 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#ifndef __FreeBSD__
-#define _BSD_SOURCE /* required by strdup() */
-#define _DARWIN_C_SOURCE /* strdup() on OS X */
-#endif
+#include "../config.h"
#include <curl/curl.h>
#include <json.h>
diff --git a/src/libpiano/response.c b/src/libpiano/response.c
index 542ef00..7f0cee0 100644
--- a/src/libpiano/response.c
+++ b/src/libpiano/response.c
@@ -21,10 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#ifndef __FreeBSD__
-#define _BSD_SOURCE /* required by strdup() */
-#define _DARWIN_C_SOURCE /* strdup() on OS X */
-#endif
+#include "../config.h"
#include <json.h>
#include <string.h>