diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | pacredir.c | 30 | ||||
-rw-r--r-- | pacredir.h | 33 |
3 files changed, 34 insertions, 31 deletions
@@ -7,7 +7,7 @@ INSTALL := install CP := cp RM := rm SED := sed -CFLAGS += -O2 -Wall -Werror +CFLAGS += -std=c11 -O2 -Wall -Werror CFLAGS += -lpthread CFLAGS += $(shell pkg-config --libs --cflags libcurl) CFLAGS += $(shell pkg-config --libs --cflags avahi-client) @@ -5,36 +5,6 @@ * of the GNU General Public License, incorporated herein by reference. */ -/* glibc headers */ -#include <arpa/inet.h> -#include <assert.h> -#include <getopt.h> -#include <math.h> -#include <net/if.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <time.h> - -/* Avahi headers */ -#include <avahi-client/lookup.h> -#include <avahi-common/error.h> -#include <avahi-common/simple-watch.h> - -/* various headers needing linker options */ -#include <curl/curl.h> -#include <iniparser.h> -#include <microhttpd.h> -#include <pthread.h> - -/* compile time configuration */ -#include "arch.h" -#include "config.h" -#include "version.h" - /* define structs and functions */ #include "pacredir.h" @@ -8,6 +8,39 @@ #ifndef _PACREDIR_H #define _PACREDIR_H +#define _GNU_SOURCE + +/* glibc headers */ +#include <arpa/inet.h> +#include <assert.h> +#include <getopt.h> +#include <math.h> +#include <net/if.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <time.h> + +/* Avahi headers */ +#include <avahi-client/lookup.h> +#include <avahi-common/error.h> +#include <avahi-common/simple-watch.h> + +/* various headers needing linker options */ +#include <curl/curl.h> +#include <iniparser.h> +#include <microhttpd.h> +#include <pthread.h> + +/* compile time configuration */ +#include "arch.h" +#include "config.h" +#include "version.h" + + /* services */ struct services { /* network port */ |