[Libguestfs] [PATCH] Revert "lib: Don't need to include <rpc/types.h>."

Richard W.M. Jones rjones at redhat.com
Mon Oct 5 14:33:14 UTC 2015


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




More information about the Libguestfs mailing list