Richard W.M. Jones
2018-May-15 08:35 UTC
[Libguestfs] [PATCH v2 0/2] Fix building on macOS
v1 was here: https://www.redhat.com/archives/libguestfs/2018-May/msg00042.html v2: - Split into two patches dealing with the different issues. - git format & attribution. I only tested this on Linux but at least it doesn't break things there. Rich.
Richard W.M. Jones
2018-May-15 08:35 UTC
[Libguestfs] [PATCH v2 1/2] macOS: Include <rpc/types.h> before <rpc/xdr.h>.
From: Adam Robinson <adarobin@umich.edu> The ordering of includes is required on this platform. --- daemon/tsk.c | 2 +- daemon/yara.c | 2 +- lib/tsk.c | 2 +- lib/yara.c | 2 +- m4/guestfs-libraries.m4 | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/daemon/tsk.c b/daemon/tsk.c index ad10d74fe..00a4b04b4 100644 --- a/daemon/tsk.c +++ b/daemon/tsk.c @@ -23,8 +23,8 @@ #include <inttypes.h> #include <string.h> #include <unistd.h> -#include <rpc/xdr.h> #include <rpc/types.h> +#include <rpc/xdr.h> #include "guestfs_protocol.h" #include "daemon.h" diff --git a/daemon/yara.c b/daemon/yara.c index 0fd09815a..9e7bc9414 100644 --- a/daemon/yara.c +++ b/daemon/yara.c @@ -25,8 +25,8 @@ #include <string.h> #include <unistd.h> #include <stdbool.h> -#include <rpc/xdr.h> #include <rpc/types.h> +#include <rpc/xdr.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/lib/tsk.c b/lib/tsk.c index 09e514bd2..cb1dc94ec 100644 --- a/lib/tsk.c +++ b/lib/tsk.c @@ -25,8 +25,8 @@ #include <sys/stat.h> #include <sys/types.h> #include <string.h> -#include <rpc/xdr.h> #include <rpc/types.h> +#include <rpc/xdr.h> #include "guestfs.h" #include "guestfs_protocol.h" diff --git a/lib/yara.c b/lib/yara.c index edced3be8..27390d153 100644 --- a/lib/yara.c +++ b/lib/yara.c @@ -25,8 +25,8 @@ #include <sys/stat.h> #include <sys/types.h> #include <string.h> -#include <rpc/xdr.h> #include <rpc/types.h> +#include <rpc/xdr.h> #include "guestfs.h" #include "guestfs_protocol.h" diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 index 17cf556d9..cbc77a17c 100644 --- a/m4/guestfs-libraries.m4 +++ b/m4/guestfs-libraries.m4 @@ -183,7 +183,8 @@ PKG_CHECK_MODULES([RPC], [libtirpc], [], [ RPC_CFLAGS="" AC_CHECK_HEADER([rpc/xdr.h],[],[ AC_MSG_ERROR([XDR header files are required]) - ]) + ], + [#include <rpc/types.h>]) old_LIBS="$LIBS" LIBS="" -- 2.16.2
Richard W.M. Jones
2018-May-15 08:35 UTC
[Libguestfs] [PATCH v2 2/2] macOS: unix-utils: Include <sys/mount.h>.
If <sys/mount.h> is available on the platform, always include it in this file. --- common/mlutils/unix_utils-c.c | 4 ++++ m4/guestfs-libraries.m4 | 1 + 2 files changed, 5 insertions(+) diff --git a/common/mlutils/unix_utils-c.c b/common/mlutils/unix_utils-c.c index 1b5eb7957..3344ff42f 100644 --- a/common/mlutils/unix_utils-c.c +++ b/common/mlutils/unix_utils-c.c @@ -55,6 +55,10 @@ #include <windows.h> #endif +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif + #include <caml/alloc.h> #include <caml/fail.h> #include <caml/memory.h> diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 index cbc77a17c..095dd38bf 100644 --- a/m4/guestfs-libraries.m4 +++ b/m4/guestfs-libraries.m4 @@ -47,6 +47,7 @@ AC_CHECK_HEADERS([\ linux/rtc.h \ printf.h \ sys/inotify.h \ + sys/mount.h \ sys/resource.h \ sys/socket.h \ sys/statfs.h \ -- 2.16.2
On Tuesday, 15 May 2018 10:35:15 CEST Richard W.M. Jones wrote:> v1 was here: > https://www.redhat.com/archives/libguestfs/2018-May/msg00042.html > > v2: > > - Split into two patches dealing with the different issues. > > - git format & attribution. > > I only tested this on Linux but at least it doesn't break things > there.LGTM. -- Pino Toscano
Possibly Parallel Threads
- [PATCH] Fix building on macOS
- [PATCH v2 0/2] builder: Choose better weights in the planner.
- [PATCH v3 0/2] builder: Choose better weights in the planner.
- [PATCH 0/2] builder: Choose better weights in the planner.
- [PATCH] common/mlutils: fix f_type comparisons