opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit bf8b7becf2167e13a5b43d8f61b7e16913de2ead
parent 3df794793ea3db2a6a8abfeb46803b9c5b80502a
Author: Duncaen <mail@duncano.de>
Date:   Wed, 30 Jan 2019 22:29:11 +0100

libopenbsd: minor cleanup

Diffstat:
Mlibopenbsd/closefrom.c | 2+-
Mlibopenbsd/errc.c | 4++--
Mlibopenbsd/execvpe.c | 6+++---
Mlibopenbsd/openbsd.h | 2--
Dlibopenbsd/pledge-noop.c | 7-------
Mlibopenbsd/verrc.c | 4++--
6 files changed, 8 insertions(+), 17 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) {