]> git.armaanb.net Git - opendoas.git/commitdiff
fix sys/tree.h test
authorDuncaen <mail@duncano.de>
Mon, 27 Jun 2016 16:18:42 +0000 (18:18 +0200)
committerDuncaen <mail@duncano.de>
Mon, 27 Jun 2016 16:18:42 +0000 (18:18 +0200)
configure
env.c

index b5cbf80e440a0cfdd82925856ffca16177085235..48a515a6776312956c716ebf5790a01c0e43cabb 100755 (executable)
--- a/configure
+++ b/configure
@@ -266,16 +266,6 @@ int main(void) {
 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.
 #
@@ -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 9baf4a514dfa6e628030ad49c2d5b4c1a1219e12..f25d21f7abc9f0d8b73ca1f2f4ccde926fcfcc2a 100644 (file)
--- a/env.c
+++ b/env.c
  */
 
 #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>