Skip to content

Commit

Permalink
Make building clean on linux, use config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
vasi committed Apr 25, 2020
1 parent 49acde1 commit 29e57ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sys/endian.h>])
AC_CHECK_DECLS([htole64, le64toh], [], [], [
#define _GNU_SOURCE 1
#include <sys/endian.h>
]
)
],
[], [])

AC_CHECK_HEADER([endian.h],
[
AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <endian.h>])
AC_CHECK_DECLS([htole64, le64toh], [], [], [
#define _GNU_SOURCE 1
#include <endian.h>
])
],
[], [])

Expand Down
1 change: 1 addition & 0 deletions src/endian.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ void xle64enc(uint8_t *d, uint64_t n) {

#elif defined(__linux__) || defined(__FreeBSD__)

#include "config.h"
#include <stdint.h>
#include <string.h>
#ifdef __linux__
Expand Down

0 comments on commit 29e57ec

Please sign in to comment.