Fix autotools on FreeBSD.

Endianness fun is not provided by the same header file on GNU/Linux (endian.h) and FreeBSD (sys/endian.h).  Add some magic for the autotools to detect the correct header file.  While here, add AC_C_INLINE: it's reported as missing by autoscan(1).
This commit is contained in:
Romain Tartiere 2009-12-22 20:48:13 +00:00
parent 58d83ae20a
commit 4bf33cc707
4 changed files with 22 additions and 2 deletions

View file

@ -29,8 +29,16 @@
* October 6, 2008
*/
#define _BSD_SOURCE
#include <endian.h>
#include "config.h"
#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>
#include <stdlib.h>
#include <string.h>