summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-24 00:38:52 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-24 00:38:52 +0200
commitc43719d6ba9c7d3395af1f15c74882bdf26cdc86 (patch)
tree56283f9c7592d73f7a5369532a3b4fc3e7f82961
parentc3c566aaf146b292ad4638319a4750f9f843d65a (diff)
Add global _GNU_SOURCE define
-rw-r--r--meson.build2
-rw-r--r--minecctl/minecctl.c1
-rw-r--r--minecproxy/idle.c1
-rw-r--r--minecproxy/main.c1
-rw-r--r--minecproxy/server-config.c1
-rw-r--r--minecproxy/server-proxy.c1
-rw-r--r--minecproxy/server.c1
-rw-r--r--minecproxy/signal-handler.c1
-rw-r--r--minecproxy/uring.c1
-rw-r--r--shared/config-parser.c1
-rw-r--r--shared/config-parser.h1
11 files changed, 2 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index cc9edc1..cd95e87 100644
--- a/meson.build
+++ b/meson.build
@@ -5,6 +5,8 @@ project('minecproxy',
default_options : ['c_std=gnu18']
)
+add_global_arguments('-D_GNU_SOURCE', language: 'c')
+
sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'), meson.project_name())
mainconfname = meson.project_name() + '.conf'
diff --git a/minecctl/minecctl.c b/minecctl/minecctl.c
index acee3b1..bbc5d47 100644
--- a/minecctl/minecctl.c
+++ b/minecctl/minecctl.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/minecproxy/idle.c b/minecproxy/idle.c
index c49846d..79c7bab 100644
--- a/minecproxy/idle.c
+++ b/minecproxy/idle.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <inttypes.h>
#include <sys/socket.h>
#include <netinet/ip.h>
diff --git a/minecproxy/main.c b/minecproxy/main.c
index f83b956..9a57aa8 100644
--- a/minecproxy/main.c
+++ b/minecproxy/main.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/minecproxy/server-config.c b/minecproxy/server-config.c
index c388eb2..5d8c724 100644
--- a/minecproxy/server-config.c
+++ b/minecproxy/server-config.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <stdio.h>
#include <ctype.h>
#include <string.h>
diff --git a/minecproxy/server-proxy.c b/minecproxy/server-proxy.c
index d8ff0cf..087773d 100644
--- a/minecproxy/server-proxy.c
+++ b/minecproxy/server-proxy.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <time.h>
diff --git a/minecproxy/server.c b/minecproxy/server.c
index 534ceca..c6e6480 100644
--- a/minecproxy/server.c
+++ b/minecproxy/server.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
diff --git a/minecproxy/signal-handler.c b/minecproxy/signal-handler.c
index 67c2e0b..0173bf8 100644
--- a/minecproxy/signal-handler.c
+++ b/minecproxy/signal-handler.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <sys/signalfd.h>
#include <signal.h>
#include <fcntl.h>
diff --git a/minecproxy/uring.c b/minecproxy/uring.c
index e979471..79b90b8 100644
--- a/minecproxy/uring.c
+++ b/minecproxy/uring.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <liburing.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/shared/config-parser.c b/shared/config-parser.c
index e2ff413..8094cda 100644
--- a/shared/config-parser.c
+++ b/shared/config-parser.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#include <stdio.h>
#include <ctype.h>
#include <string.h>
diff --git a/shared/config-parser.h b/shared/config-parser.h
index e371dec..7d99e31 100644
--- a/shared/config-parser.h
+++ b/shared/config-parser.h
@@ -1,7 +1,6 @@
#ifndef fooconfigparserhfoo
#define fooconfigparserhfoo
-#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>