aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2019-01-30 22:29:11 +0100
committerDuncaen <mail@duncano.de>2019-01-30 23:19:17 +0100
commitbf8b7becf2167e13a5b43d8f61b7e16913de2ead (patch)
tree09d70f036b6f07406e7ae62517757f802e9eb754
parent3df794793ea3db2a6a8abfeb46803b9c5b80502a (diff)
downloadopendoas-bf8b7becf2167e13a5b43d8f61b7e16913de2ead.tar.gz
libopenbsd: minor cleanup
-rw-r--r--libopenbsd/closefrom.c2
-rw-r--r--libopenbsd/errc.c4
-rw-r--r--libopenbsd/execvpe.c6
-rw-r--r--libopenbsd/openbsd.h2
-rw-r--r--libopenbsd/pledge-noop.c7
-rw-r--r--libopenbsd/verrc.c4
6 files changed, 8 insertions, 17 deletions
diff --git a/libopenbsd/closefrom.c b/libopenbsd/closefrom.c
index b56476a..ef7d611 100644
--- a/libopenbsd/closefrom.c
+++ b/libopenbsd/closefrom.c
@@ -69,7 +69,7 @@ void
closefrom(int lowfd)
{
long fd, maxfd;
-#if defined(HAVE_DIRFD) && defined(HAVE_PROC_PID)
+#if defined(HAVE_PROC_PID)
char fdpath[PATH_MAX], *endp;
struct dirent *dent;
DIR *dirp;
diff --git a/libopenbsd/errc.c b/libopenbsd/errc.c
index 8e8474b..37eff0f 100644
--- a/libopenbsd/errc.c
+++ b/libopenbsd/errc.c
@@ -28,11 +28,11 @@
* SUCH DAMAGE.
*/
+#include "includes.h"
+
#include <err.h>
#include <stdarg.h>
-#include "openbsd.h"
-
__dead void
errc(int eval, int code, const char *fmt, ...)
{
diff --git a/libopenbsd/execvpe.c b/libopenbsd/execvpe.c
index 4ddad3e..c3238ea 100644
--- a/libopenbsd/execvpe.c
+++ b/libopenbsd/execvpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.20 2013/01/08 02:26:09 deraadt Exp $ */
+/* $OpenBSD: exec.c,v 1.23 2016/03/13 18:34:20 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -28,6 +28,8 @@
* SUCH DAMAGE.
*/
+#include "includes.h"
+
#include <sys/types.h>
#include <sys/uio.h>
@@ -40,8 +42,6 @@
#include <string.h>
#include <unistd.h>
-#include "includes.h"
-
int
execvpe(const char *name, char *const *argv, char *const *envp)
{
diff --git a/libopenbsd/openbsd.h b/libopenbsd/openbsd.h
index d9d3c99..793d9bf 100644
--- a/libopenbsd/openbsd.h
+++ b/libopenbsd/openbsd.h
@@ -4,8 +4,6 @@
#include <stdarg.h>
#include <sys/types.h>
-#include "readpassphrase.h"
-
/* API definitions lifted from OpenBSD src/include */
/* pwd.h */
diff --git a/libopenbsd/pledge-noop.c b/libopenbsd/pledge-noop.c
deleted file mode 100644
index 0a1b610..0000000
--- a/libopenbsd/pledge-noop.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "openbsd.h"
-
-int
-pledge(__UNUSED const char *promises, __UNUSED const char *paths[])
-{
- return 0;
-}
diff --git a/libopenbsd/verrc.c b/libopenbsd/verrc.c
index e00fcd1..15400bc 100644
--- a/libopenbsd/verrc.c
+++ b/libopenbsd/verrc.c
@@ -28,14 +28,14 @@
* SUCH DAMAGE.
*/
+#include "includes.h"
+
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
-#include "openbsd.h"
-
__dead void
verrc(int eval, int code, const char *fmt, va_list ap)
{