Pino Toscano
2015-Oct-05 14:10 UTC
[Libguestfs] [PATCH] Revert "lib: Don't need to include <rpc/types.h>."
The include is not needed with GNU libc, where rpc/xdr.h includes it [1]. But this does not happen on other libc's, for example the FreeBSD [2] and Mac OS X [3] ones. Hence put it back, with an extra comment about this. [1] http://linux.die.net/man/3/xdr [2] http://www.freebsd.org/cgi/man.cgi?query=xdr&sektion=3&apropos=0&manpath=freebsd [3] https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/xdr.3.html This reverts commit ada85d15669886f0456ffecf1b13fc7a7df38e5c. --- src/guestfs-internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 113705d..72f9968 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -21,6 +21,7 @@ #include <stdbool.h> +#include <rpc/types.h> /* Needed on libc's different than glibc. */ #include <rpc/xdr.h> #include <pcre.h> -- 2.1.0
Richard W.M. Jones
2015-Oct-05 14:33 UTC
Re: [Libguestfs] [PATCH] Revert "lib: Don't need to include <rpc/types.h>."
On Mon, Oct 05, 2015 at 04:10:46PM +0200, Pino Toscano wrote:> The include is not needed with GNU libc, where rpc/xdr.h includes it > [1]. But this does not happen on other libc's, for example the > FreeBSD [2] and Mac OS X [3] ones. > > Hence put it back, with an extra comment about this. > > [1] http://linux.die.net/man/3/xdr > [2] http://www.freebsd.org/cgi/man.cgi?query=xdr&sektion=3&apropos=0&manpath=freebsd > [3] https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/xdr.3.html > > This reverts commit ada85d15669886f0456ffecf1b13fc7a7df38e5c. > --- > src/guestfs-internal.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h > index 113705d..72f9968 100644 > --- a/src/guestfs-internal.h > +++ b/src/guestfs-internal.h > @@ -21,6 +21,7 @@ > > #include <stdbool.h> > > +#include <rpc/types.h> /* Needed on libc's different than glibc. */ > #include <rpc/xdr.h> > > #include <pcre.h>ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Maybe Matching Threads
- R-2.2.1 doesn't compile under cygwin/Win2000
- Question about object permanence/marshalling
- building libvirt-0.8.3 for windows ( with dlls )
- Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
- Conditional for XDR code left out in saveload.c (PR#478)