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

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:09:38 UTC 2014


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

bengen pushed a commit to annotated tag debian/1%1.28.2-1
in repository libguestfs.

commit d40dfbb44df4c49c8a347781a1d8f3acaa006d0f
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.
    
    (cherry picked from commit c1ad89170d19312311699f1d36990ab504542e5c)
---
 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 1156c04..f147e19 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