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

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


Richard W.M. Jones wrote:

> On Mon, Aug 17, 2009 at 11:10:53AM +0200, Jim Meyering wrote:
>> 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
>>
>> _______________________________________________
>> Libguestfs mailing list
>> Libguestfs at redhat.com
>> https://www.redhat.com/mailman/listinfo/libguestfs
>
> ACK.
>
> (Really a bug in python headers, I guess ...)

I think so, too.




More information about the Libguestfs mailing list