[Libguestfs] [PATCH libguestfs 02/13] python: avoid "_POSIX_C_SOURCE" redefinition warning

Jim Meyering jim at meyering.net
Mon Aug 17 09:10:53 UTC 2009


From: Jim Meyering <meyering at redhat.com>

* src/generator.ml: Include <Python.h> *before* <stdio.h>
to avoid redefinition warning about "_POSIX_C_SOURCE".
---
 src/generator.ml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/generator.ml b/src/generator.ml
index 8a8d66e..58c3c9c 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -7322,12 +7322,12 @@ and generate_python_c () =
   generate_header CStyle LGPLv2;

   pr "\
+#include <Python.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>

-#include <Python.h>
-
 #include \"guestfs.h\"

 typedef struct {
-- 
1.6.4.378.g88f2f




More information about the Libguestfs mailing list