diff --git a/bin/xbps-bin/main.c b/bin/xbps-bin/main.c index 51e82088502..e4d8d9ec707 100644 --- a/bin/xbps-bin/main.c +++ b/bin/xbps-bin/main.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/bin/xbps-pkgdb/main.c b/bin/xbps-pkgdb/main.c index 8d093174577..f70aad905ee 100644 --- a/bin/xbps-pkgdb/main.c +++ b/bin/xbps-pkgdb/main.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/bin/xbps-repo/main.c b/bin/xbps-repo/main.c index 036191a7194..0fa1a3a13c0 100644 --- a/bin/xbps-repo/main.c +++ b/bin/xbps-repo/main.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/cmpver.c b/lib/cmpver.c index 4bc828811a2..d946f17e251 100644 --- a/lib/cmpver.c +++ b/lib/cmpver.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/lib/fexec.c b/lib/fexec.c index 4f10078e88c..0319c0549fa 100644 --- a/lib/fexec.c +++ b/lib/fexec.c @@ -35,6 +35,8 @@ #include #include +#include + static int vfcexec(const char *, int, const char *, va_list); static int pfcexec(const char *, const char *, const char **); diff --git a/vars.mk b/vars.mk index ecb45731afa..b9c3c602c01 100644 --- a/vars.mk +++ b/vars.mk @@ -8,5 +8,7 @@ TOPDIR ?= .. INSTALL_STRIPPED ?= -s LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps -CPPFLAGS += -I$(TOPDIR)/include -CFLAGS += -O2 -Wall -Wextra -Werror -fPIC -DPIC +CPPFLAGS += -I$(TOPDIR)/include -D_XOPEN_SOURCE=600 +WARNFLAGS ?= -pedantic -std=c99 -Wall -Wextra -Werror -Wshadow -Wformat=2 +WARNFLAGS += -Wmissing-declarations -Wcomment -Wunused-macros -Wendif-labels +CFLAGS += $(WARNFLAGS) -O2 -fPIC -DPIC