Add _GNU_SOURCE to all files

If configured with CFLAGS=-std=c99, then quite a few warnings are
raised, as well as a couple of errors. By forcing the system to use
_GNU_SOURCE, we can allow the compilation to succeed even if using a
user defined C standard.
pull/22/head
nirenjan 2020-06-05 16:37:20 -07:00
parent 543aec85b1
commit 88f02bc5da
6 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>
#include <stdint.h>

View File

@ -143,6 +143,7 @@ possibly through \b sudo(8)
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>
#include <stdint.h>

View File

@ -6,11 +6,13 @@
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <locale.h>
#include <time.h>
#include "libx52.h"

View File

@ -6,6 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>
#include <string.h>

View File

@ -6,6 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>
#include <string.h>

View File

@ -6,6 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>
#include <string.h>