mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
build: look for and use sys/endian.h
Some OSes have sys/endian.h instead of glibc's endian.h.
This commit is contained in:
@@ -288,6 +288,7 @@ AC_CHECK_HEADERS([\
|
||||
attr/xattr.h \
|
||||
byteswap.h \
|
||||
endian.h \
|
||||
sys/endian.h \
|
||||
errno.h \
|
||||
linux/fs.h \
|
||||
linux/raid/md_u.h \
|
||||
|
||||
@@ -22,7 +22,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#include "guestfs_protocol.h"
|
||||
#include "daemon.h"
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
/* be32toh is usually a macro definend in <endian.h>, but it might be
|
||||
* a function in some system so check both, and if neither is defined
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#include <pcre.h>
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#include "full-read.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user