[PATCH 6/6] define _GNU_SOURCE to get asprintf's definition

Nikos Mavrogiannopoulos nmav at gnutls.org
Tue Aug 26 05:49:52 PDT 2014


On Tue, Aug 26, 2014 at 12:30 PM, David Woodhouse <dwmw2 at infradead.org> wrote:
> On Mon, 2014-08-25 at 10:47 +0200, Nikos Mavrogiannopoulos wrote:
>> --- a/auth.c
>> +++ b/auth.c
>> @@ -19,6 +19,7 @@
>>
>>  #include <config.h>
>>
>> +#define _GNU_SOURCE /* for asprintf */
>>  #include <stdio.h>
>>  #include <unistd.h>
>>  #include <fcntl.h>
>
> ../auth.c:22:0: warning: "_GNU_SOURCE" redefined [enabled by default]
>  #define _GNU_SOURCE /* for asprintf */
> In file included from ../auth.c:20:0:
> ./config.h:198:0: note: this is the location of the previous definition
>  #define _GNU_SOURCE 1
> Is this for Windows, just to avoid having to use our asprintf() compat
> function?

In my mingw build I have asprintf (configure detects it), but my build
fails unless I define _GNU_SOURCE due to the -Werror undefined. I see
that you define it in configure.ac, I'll add it there and resend the
patch.

regards,
Nikos



More information about the openconnect-devel mailing list