# HG changeset patch # User john.levon@xxxxxxx # Date 1229399267 28800 # Node ID 53a18080ea210168c044d7ade8dd8db0881d5c85 # Parent cd2fb266824178c4d63296b587eeedb2360f9f1c Portability fixes for directory storage backend Signed-off-by: John Levon <john.levon@xxxxxxx> diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -75,7 +75,7 @@ AC_CHECK_FUNCS([cfmakeraw regexec uname AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid]) dnl Availability of various common headers (non-fatal if missing). -AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h sys/wait.h winsock2.h sched.h termios.h sys/poll.h]) +AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h sys/wait.h winsock2.h sched.h termios.h sys/poll.h endian.h]) dnl Where are the XDR functions? dnl If portablexdr is installed, prefer that. diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c --- a/src/storage_backend_fs.c +++ b/src/storage_backend_fs.c @@ -31,10 +31,14 @@ #include <errno.h> #include <fcntl.h> #include <unistd.h> +#include <string.h> + +#ifdef HAVE_ENDIAN_H #include <endian.h> -#include <byteswap.h> -#include <mntent.h> -#include <string.h> +#else +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#endif #include <libxml/parser.h> #include <libxml/tree.h> @@ -240,6 +244,9 @@ static int virStorageBackendProbeFile(vi } #if WITH_STORAGE_FS + +#include <mntent.h> + struct _virNetfsDiscoverState { const char *host; virStoragePoolSourceList list; -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list