mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
RHEL 5: inspect: Add macro for be32toh if one is not defined in the header files.
This commit is contained in:
@@ -279,6 +279,7 @@ AC_CHECK_HEADERS([\
|
||||
|
||||
dnl Functions.
|
||||
AC_CHECK_FUNCS([\
|
||||
be32toh \
|
||||
fsync \
|
||||
futimens \
|
||||
getxattr \
|
||||
|
||||
@@ -32,6 +32,18 @@
|
||||
#include <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
|
||||
* then define be32toh for RHEL 5.
|
||||
*/
|
||||
#if !defined(HAVE_BE32TOH) && !defined(be32toh)
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define be32toh(x) __bswap_32 (x)
|
||||
#else
|
||||
#define be32toh(x) (x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <pcre.h>
|
||||
|
||||
#include "xstrtol.h"
|
||||
|
||||
Reference in New Issue
Block a user