diff --git a/npa/configure.ac b/npa/configure.ac index 0fc0c2d..d5b31a6 100644 --- a/npa/configure.ac +++ b/npa/configure.ac @@ -159,7 +159,7 @@ AC_TYPE_UINT8_T # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_REALLOC -AC_CHECK_FUNCS([getline memmove memset strerror gettimeofday strtol]) +AC_CHECK_FUNCS([getline memmove memset strerror gettimeofday strtol strlcpy]) AC_SUBST(DYN_LIB_EXT) case "$host" in diff --git a/npa/src/boxing.c b/npa/src/boxing.c index c0c1c81..f88dbc5 100644 --- a/npa/src/boxing.c +++ b/npa/src/boxing.c @@ -33,6 +33,10 @@ /* FIXME might not always work */ #define htole16(x) (x) #define htole32(x) (x) +#elif __APPLE__ +#include +#define htole16(x) OSSwapHostToLittleInt16(x) +#define htole32(x) OSSwapHostToLittleInt32(x) #else #ifndef _BSD_SOURCE #define _BSD_SOURCE /* See feature_test_macros(7) */