RHEL 5: tests/xml: Define O_CLOEXEC in LD_PRELOAD library.

This commit is contained in:
Richard W.M. Jones
2013-03-11 11:03:55 +00:00
parent 1b5b397da8
commit d9efcfb556

View File

@@ -25,6 +25,15 @@
#include <sys/types.h>
#include <sys/stat.h>
/* We're not using gnulib here so that we don't have to link to gnulib
* rpl_* libraries (not possible since this is an LD_PRELOAD lib).
* However that does mean we have to define O_CLOEXEC explicitly for
* RHEL 5.
*/
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
/* Old <libvirt.h> had a slightly different definition of
* virDomainGetXMLDesc (using 'int' for flags instead of 'unsigned
* int'). To avoid an error trying to redefine it with a different