From ab7e87d5ef426f47939dd61c4c69104b27dd8cbc Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 8 Jul 2022 09:41:43 +0200 Subject: [PATCH] Compile with _GNU_SOURCE --- .vscode/settings.json | 4 +++- Makefile | 2 +- html/index.html | 2 +- http/http.c | 2 -- opts/log.c | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c156a0c..0f1a7ec 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -70,6 +70,8 @@ "log.h": "c", "buffer_list.h": "c", "buffer.h": "c", - "stdbool.h": "c" + "stdbool.h": "c", + "v4l2.h": "c", + "stdlib.h": "c" } } diff --git a/Makefile b/Makefile index b2a3fd9..edbc084 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ SRC := $(wildcard **/*.c **/*/*.c **/*.cc **/*/*.cc) HEADERS := $(wildcard **/*.h **/*/*.h **/*.hh **/*/*.hh) HTML := $(wildcard html/*.js html/*.html) -CFLAGS := -Werror -Wall -g -I$(CURDIR) +CFLAGS := -Werror -Wall -g -I$(CURDIR) -D_GNU_SOURCE LDLIBS := -lpthread -lstdc++ ifneq (x,x$(shell which ccache)) diff --git a/html/index.html b/html/index.html index 54ca405..7745dfe 100644 --- a/html/index.html +++ b/html/index.html @@ -55,7 +55,7 @@ The commands available on some cameras:

diff --git a/http/http.c b/http/http.c index d34abaa..fc72fc7 100644 --- a/http/http.c +++ b/http/http.c @@ -1,5 +1,3 @@ -#define _GNU_SOURCE - #include #include #include diff --git a/opts/log.c b/opts/log.c index d9c8c92..1d4fba8 100644 --- a/opts/log.c +++ b/opts/log.c @@ -1,7 +1,6 @@ #include "opts/log.h" #include "opts/opts.h" -#define _GNU_SOURCE #include char *