summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--template/base.gpr3
-rw-r--r--usr.bin/comm/comm.c1
-rw-r--r--usr.bin/nohup/nohup.c2
-rw-r--r--usr.bin/patch/patch.c2
-rw-r--r--usr.bin/sed/defs.h2
-rw-r--r--usr.bin/sed/main.c2
-rw-r--r--usr.bin/unexpand/unexpand.c2
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <unistd.h>
#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 <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include <bsd/string.h>
#include <errno.h>
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 <getopt.h>
#include <limits.h>
#include <stdio.h>
-#include <string.h>
+#include <bsd/string.h>
#include <stdlib.h>
#include <unistd.h>
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 <stdio.h>
#include <stdlib.h>
#include <bsd/stdlib.h>
-#include <string.h>
+#include <bsd/string.h>
#include <unistd.h>
#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 <limits.h>
-#include <stdio.h>
+#include <bsd/stdio.h>
#include <bsd/stdlib.h>
#include <string.h>
#include <unistd.h>