X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=libopenbsd%2Fopenbsd.h;h=da420de7fdd63832973f891cc053ab2cd706b178;hb=5dc1cdecb149196c944c3a0983051eeae6c2b3a0;hp=05868444a8c9d1847e7a353f97657b854293f941;hpb=4f7ed3854a4db241401f5b84cbb6246a06a17561;p=opendoas.git diff --git a/libopenbsd/openbsd.h b/libopenbsd/openbsd.h index 0586844..da420de 100644 --- a/libopenbsd/openbsd.h +++ b/libopenbsd/openbsd.h @@ -4,7 +4,13 @@ #include #include -#include "readpassphrase.h" +#ifndef __UNUSED +# define __UNUSED __attribute__ ((unused)) +#endif + +#ifndef __dead +# define __dead __attribute__ ((noreturn)) +#endif /* API definitions lifted from OpenBSD src/include */ @@ -41,13 +47,16 @@ int setresuid(uid_t, uid_t, uid_t); #ifndef HAVE_PLEDGE int pledge(const char *promises, const char *paths[]); #endif /* !HAVE_PLEDGE */ +#ifndef HAVE_CLOSEFROM +void closefrom(int); +#endif /* !HAVE_CLOSEFROM */ /* err.h */ #ifndef HAVE_VERRC -void verrc(int eval, int code, const char *fmt, va_list ap); +void __dead verrc(int eval, int code, const char *fmt, va_list ap); #endif /* !HAVE_VERRC */ #ifndef HAVE_ERRC -void errc(int eval, int code, const char *fmt, ...); +__dead void errc(int eval, int code, const char *fmt, ...); #endif /* !HAVE_ERRC */ #ifndef HAVE_SETPROGNAME