[Pkg-libvirt-commits] [libguestfs] 128/179: build: look for and use sys/endian.h

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:08:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit c1ad89170d19312311699f1d36990ab504542e5c
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Thu Oct 16 10:42:05 2014 +0200

    build: look for and use sys/endian.h
    
    Some OSes have sys/endian.h instead of glibc's endian.h.
---
 configure.ac             | 1 +
 daemon/journal.c         | 5 +++++
 src/inspect-apps.c       | 3 +++
 src/inspect-fs-windows.c | 3 +++
 src/journal.c            | 3 +++
 5 files changed, 15 insertions(+)

diff --git a/configure.ac b/configure.ac
index 6c33444..8cd29d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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 \
diff --git a/daemon/journal.c b/daemon/journal.c
index 3fd2135..a2a1c73 100644
--- a/daemon/journal.c
+++ b/daemon/journal.c
@@ -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"
diff --git a/src/inspect-apps.c b/src/inspect-apps.c
index a77e9ce..b62b432 100644
--- a/src/inspect-apps.c
+++ b/src/inspect-apps.c
@@ -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
diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c
index 20e4d7f..6d430d1 100644
--- a/src/inspect-fs-windows.c
+++ b/src/inspect-fs-windows.c
@@ -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>
 
diff --git a/src/journal.c b/src/journal.c
index 61ab352..1070067 100644
--- a/src/journal.c
+++ b/src/journal.c
@@ -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"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list