From: Duncaen Date: Wed, 30 Jan 2019 21:29:11 +0000 (+0100) Subject: libopenbsd: minor cleanup X-Git-Tag: v6.6~35 X-Git-Url: https://git.armaanb.net/?p=opendoas.git;a=commitdiff_plain;h=bf8b7becf2167e13a5b43d8f61b7e16913de2ead libopenbsd: minor cleanup --- 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 #include -#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 #include @@ -40,8 +42,6 @@ #include #include -#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 #include -#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 #include #include #include #include -#include "openbsd.h" - __dead void verrc(int eval, int code, const char *fmt, va_list ap) {