summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-10-21 14:12:01 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-10-21 14:12:01 +0200
commit7b79e28360e1b62dfbac95fd07d671be12697409 (patch)
tree7495d0a6960e191b39107dda932402e1c0424fda
parentc1dc9eca90b37b7fa99321d3400685beed47fd46 (diff)
downloadcqrlogo-7b79e28360e1b62dfbac95fd07d671be12697409.tar.gz
cqrlogo-7b79e28360e1b62dfbac95fd07d671be12697409.tar.zst
use ISO C11 standard
-rw-r--r--Makefile2
-rw-r--r--cqrlogo.h2
-rw-r--r--lib/Makefile2
-rw-r--r--lib/libcqrlogo.h2
4 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 542e84e..71027c8 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ SED := sed
PNGCHK := pngcheck
ZBARIMG := zbarimg
# flags
-CFLAGS += -O2 -Wall -Werror
+CFLAGS += -std=c11 -O2 -Wall -Werror
CFLAGSSTATIC = $(CFLAGS)
CFLAGSSTATIC += -liniparser
CFLAGSSTATIC += $(shell pkg-config --cflags --libs libpng)
diff --git a/cqrlogo.h b/cqrlogo.h
index 00795b9..430df26 100644
--- a/cqrlogo.h
+++ b/cqrlogo.h
@@ -8,6 +8,8 @@
#ifndef _CQRLOGO_H
#define _CQRLOGO_H
+#define _GNU_SOURCE
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/Makefile b/lib/Makefile
index 93cd374..d5fb710 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -2,7 +2,7 @@
CC := gcc
LN := ln
-CFLAGS += -O2 -Wall -Werror
+CFLAGS += -std=c11 -O2 -Wall -Werror
CFLAGS += -liniparser
CFLAGS += $(shell pkg-config --cflags --libs libpng)
CFLAGS += $(shell pkg-config --cflags --libs zlib)
diff --git a/lib/libcqrlogo.h b/lib/libcqrlogo.h
index 59ee885..0a8429b 100644
--- a/lib/libcqrlogo.h
+++ b/lib/libcqrlogo.h
@@ -8,6 +8,8 @@
#ifndef _LIBCQRLOGO_H
#define _LIBCQRLOGO_H
+#define _GNU_SOURCE
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>