aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2016-06-27 18:18:42 +0200
committerDuncaen <mail@duncano.de>2016-06-27 18:18:42 +0200
commitaedbe76e8443757d8553a35fdc217722dcd1470b (patch)
tree40c8f6ff9d0728f760cb895a09c2d69ce9359562
parentf30e68c675405fed00b8d5a7bf26ce440b634e7c (diff)
downloadopendoas-aedbe76e8443757d8553a35fdc217722dcd1470b.tar.gz
fix sys/tree.h test
-rwxr-xr-xconfigure22
-rw-r--r--env.c4
2 files changed, 12 insertions, 14 deletions
diff --git a/configure b/configure
index b5cbf80..48a515a 100755
--- a/configure
+++ b/configure
@@ -267,16 +267,6 @@ check_func "bsd_auth_h" "$src" && \
have_bsd_auth_h=1
#
-# Check for sys/tree.h.
-#
-src='
-#include <sys/tree.h>
-int main(void) {
- return 0;
-}'
-check_func "sys_tree_h" "$src"
-
-#
# Check for pam_appl.h.
#
src='
@@ -342,3 +332,15 @@ int main(void) {
check_func "pledge" "$src" || {
printf 'OPENBSD += pledge-noop.o\n' >>$CONFIG_MK
}
+
+#
+#
+#
+src='
+#include <stdlib.h>
+int main(void){return 0;}
+__attribute__((__unused__)) static void foo(void){return;}
+'
+check_func "__attribute__" "$src" || {
+ printf 'CFLAGS += -DNO_ATTRIBUTE_ON_RETURN_TYPE=1\n' >>$CONFIG_MK
+}
diff --git a/env.c b/env.c
index 9baf4a5..f25d21f 100644
--- a/env.c
+++ b/env.c
@@ -16,11 +16,7 @@
*/
#include <sys/types.h>
-#ifdef HAVE_SYS_TREE_H
-#include <sys/tree.h>
-#else
#include "sys-tree.h"
-#endif
#include <string.h>
#include <stdio.h>