From 5febc75c02efe70746168baa4469649bf0aad7da Mon Sep 17 00:00:00 2001 From: Kiyoshi Aman Date: Thu, 24 Oct 2019 02:24:23 -0400 Subject: fix some compile-via-gprbuild warnings --- template/base.gpr | 3 ++- usr.bin/comm/comm.c | 1 + usr.bin/nohup/nohup.c | 2 +- usr.bin/patch/patch.c | 2 +- usr.bin/sed/defs.h | 2 +- usr.bin/sed/main.c | 2 +- usr.bin/unexpand/unexpand.c | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/template/base.gpr b/template/base.gpr index 2516be4..896d51b 100644 --- a/template/base.gpr +++ b/template/base.gpr @@ -10,7 +10,8 @@ abstract project base is "-std=c11", "-Wall", "-Wextra", - "-Wpedantic") & CFLAGS; + "-Wpedantic", + "-D_POSIX_C_SOURCE=200809L") & CFLAGS; end Compiler; package Linker is diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c index 84e5fc4..211377f 100644 --- a/usr.bin/comm/comm.c +++ b/usr.bin/comm/comm.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #define MAXLINELEN (LINE_MAX + 1) diff --git a/usr.bin/nohup/nohup.c b/usr.bin/nohup/nohup.c index 7b3a9cd..114a287 100644 --- a/usr.bin/nohup/nohup.c +++ b/usr.bin/nohup/nohup.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include static void dofile(void); diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index c7c8f08..14ccd17 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/usr.bin/sed/defs.h b/usr.bin/sed/defs.h index d2f7157..7bbf2f1 100644 --- a/usr.bin/sed/defs.h +++ b/usr.bin/sed/defs.h @@ -54,7 +54,7 @@ enum e_atype { struct s_addr { enum e_atype type; /* Address type */ union { - u_long l; /* Line number */ + unsigned long l; /* Line number */ regex_t *r; /* Regular expression */ } u; }; diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 69def8b..7397f56 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include "defs.h" diff --git a/usr.bin/unexpand/unexpand.c b/usr.bin/unexpand/unexpand.c index 5edc21c..28fce97 100644 --- a/usr.bin/unexpand/unexpand.c +++ b/usr.bin/unexpand/unexpand.c @@ -33,7 +33,7 @@ * unexpand - put tabs into a file replacing blanks */ #include -#include +#include #include #include #include -- cgit v1.2.3-70-g09d2