summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2014-03-20 13:18:21 +0000
committerkrw <krw@openbsd.org>2014-03-20 13:18:21 +0000
commite8252b55d69423f27655b17d34f2cb54b41bf736 (patch)
tree0764f1b694b0baa8e9cadc237d869be96bd1f74b
parentAdd several devices we already have defined in usbdevs and are also known to be (diff)
downloadwireguard-openbsd-e8252b55d69423f27655b17d34f2cb54b41bf736.tar.xz
wireguard-openbsd-e8252b55d69423f27655b17d34f2cb54b41bf736.zip
Add back various #includes of err.h, unistd.h, ctype.h, ioctl.h to
eliminate multiple 'implicit' declarations introduced by the previous over-zealous #include cleanup. Thanks to to tedu@ for pointing out how -Wall reveals all.
-rw-r--r--sbin/fdisk/cmd.c5
-rw-r--r--sbin/fdisk/disk.c4
-rw-r--r--sbin/fdisk/fdisk.c3
-rw-r--r--sbin/fdisk/misc.c5
-rw-r--r--sbin/fdisk/part.c3
-rw-r--r--sbin/fdisk/user.c3
6 files changed, 17 insertions, 6 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c
index 0930053fbc0..da3e1b8ba72 100644
--- a/sbin/fdisk/cmd.c
+++ b/sbin/fdisk/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.68 2014/03/17 16:40:00 krw Exp $ */
+/* $OpenBSD: cmd.c,v 1.69 2014/03/20 13:18:21 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -28,13 +28,16 @@
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/disklabel.h>
+#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <memory.h>
#include <stdlib.h>
#include <signal.h>
+#include <unistd.h>
#include "disk.h"
+#include "misc.h"
#include "part.h"
#include "mbr.h"
#include "user.h"
diff --git a/sbin/fdisk/disk.c b/sbin/fdisk/disk.c
index 106d31b82ab..0150008b719 100644
--- a/sbin/fdisk/disk.c
+++ b/sbin/fdisk/disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disk.c,v 1.40 2014/03/17 16:40:00 krw Exp $ */
+/* $OpenBSD: disk.c,v 1.41 2014/03/20 13:18:21 krw Exp $ */
/*
* Copyright (c) 1997, 2001 Tobias Weingartner
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/fcntl.h>
+#include <sys/ioctl.h>
#include <sys/dkio.h>
#include <sys/stdint.h>
#include <sys/stat.h>
@@ -35,6 +36,7 @@
#include <util.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include "disk.h"
#include "misc.h"
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c
index 45206f262f9..70268385202 100644
--- a/sbin/fdisk/fdisk.c
+++ b/sbin/fdisk/fdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdisk.c,v 1.62 2014/03/17 16:40:00 krw Exp $ */
+/* $OpenBSD: fdisk.c,v 1.63 2014/03/20 13:18:21 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -34,6 +34,7 @@
#include <unistd.h>
#include <paths.h>
#include <stdint.h>
+#include <err.h>
#include "disk.h"
#include "part.h"
diff --git a/sbin/fdisk/misc.c b/sbin/fdisk/misc.c
index fbdbb64b61c..b71a17ab344 100644
--- a/sbin/fdisk/misc.c
+++ b/sbin/fdisk/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.40 2014/03/20 02:08:29 krw Exp $ */
+/* $OpenBSD: misc.c,v 1.41 2014/03/20 13:18:21 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -27,13 +27,16 @@
#include <sys/types.h>
#include <sys/disklabel.h>
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <err.h>
#include <errno.h>
#include "disk.h"
#include "misc.h"
+#include "part.h"
struct unit_type unit_types[] = {
{"b", 1 , "Bytes"},
diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c
index 369593091e4..4e78a056d2d 100644
--- a/sbin/fdisk/part.c
+++ b/sbin/fdisk/part.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: part.c,v 1.59 2014/03/17 16:40:00 krw Exp $ */
+/* $OpenBSD: part.c,v 1.60 2014/03/20 13:18:21 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/disklabel.h>
+#include <err.h>
#include <stdio.h>
#include <string.h>
diff --git a/sbin/fdisk/user.c b/sbin/fdisk/user.c
index 561a18b609e..64cca42e970 100644
--- a/sbin/fdisk/user.c
+++ b/sbin/fdisk/user.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: user.c,v 1.33 2014/03/17 16:40:00 krw Exp $ */
+/* $OpenBSD: user.c,v 1.34 2014/03/20 13:18:21 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -30,6 +30,7 @@
#include <sys/disklabel.h>
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
#include "disk.h"
#include "part.h"