attempt to build under OpenBSD.

This commit is contained in:
Romuald Conty 2010-04-07 14:06:04 +00:00
parent 5dc0575a8b
commit e68904d48a
2 changed files with 7 additions and 1 deletions

View file

@ -26,6 +26,8 @@ AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_FUNCS([memset letoh32 htole32])
AC_CHECK_HEADERS([endian.h sys/endian.h])
@ -36,6 +38,7 @@ fi
AC_CHECK_HEADERS([byteswap.h])
AC_DEFINE([_XOPEN_SOURCE], [600], [Define to 500 if Single Unix conformance is wanted, 600 for sixth revision.])
AC_DEFINE([_BSD_SOURCE], [1], [Define on BSD to activate all library features])
CFLAGS="$CFLAGS -std=c99"

View file

@ -31,12 +31,15 @@
#include "config.h"
#if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h>
#endif
#if defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h>
#endif
#if defined(HAVE_ENDIAN_H)
# define _BSD_SOURCE
# include <endian.h>
#endif
#include <errno.h>