From 29e57ec102dd5c472ed23dc454bc83781c564740 Mon Sep 17 00:00:00 2001 From: Dave Vasilevsky Date: Sat, 25 Apr 2020 19:41:03 -0400 Subject: [PATCH] Make building clean on linux, use config.h --- configure.ac | 11 +++++++++-- src/endian.c | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5e23c50..cc2a536 100644 --- a/configure.ac +++ b/configure.ac @@ -71,13 +71,20 @@ AC_FUNC_STRTOD AC_CHECK_FUNCS([memchr memmove memset strerror strtol]) AC_CHECK_HEADER([sys/endian.h], [ - AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include ]) + AC_CHECK_DECLS([htole64, le64toh], [], [], [ + #define _GNU_SOURCE 1 + #include + ] + ) ], [], []) AC_CHECK_HEADER([endian.h], [ - AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include ]) + AC_CHECK_DECLS([htole64, le64toh], [], [], [ + #define _GNU_SOURCE 1 + #include + ]) ], [], []) diff --git a/src/endian.c b/src/endian.c index a6eab74..280e1b5 100644 --- a/src/endian.c +++ b/src/endian.c @@ -12,6 +12,7 @@ void xle64enc(uint8_t *d, uint64_t n) { #elif defined(__linux__) || defined(__FreeBSD__) +#include "config.h" #include #include #ifdef __linux__