]> git.armaanb.net Git - opendoas.git/blobdiff - libopenbsd/openbsd.h
libopenbsd: define __dead as noreturn
[opendoas.git] / libopenbsd / openbsd.h
index 05868444a8c9d1847e7a353f97657b854293f941..da420de7fdd63832973f891cc053ab2cd706b178 100644 (file)
@@ -4,7 +4,13 @@
 #include <stdarg.h>
 #include <sys/types.h>
 
-#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