opendoas

A portable version of the OpenBSD `doas` command
git clone https://pi.duncano.de/git/opendoas.git
Log | Files | Refs | README | LICENSE

commit aedbe76e8443757d8553a35fdc217722dcd1470b
parent f30e68c675405fed00b8d5a7bf26ce440b634e7c
Author: Duncaen <mail@duncano.de>
Date:   Mon, 27 Jun 2016 18:18:42 +0200

fix sys/tree.h test

Diffstat:
configure | 22++++++++++++----------
env.c | 4----
2 files changed, 12 insertions(+), 14 deletions(-)

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