From: Anna “CyberTailor” Subject: [PATCH portable] portable: build closefrom unconditionally To: gameoftrees@openbsd.org Cc: "Anna (cybertailor) Vyalkova" Date: Thu, 9 Dec 2021 20:18:48 +0500 From: "Anna (cybertailor) Vyalkova" --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9b6a7e4e..dd8ab43c 100644 --- a/configure.ac +++ b/configure.ac @@ -121,7 +121,6 @@ AC_CHECK_FUNCS([ \ # Check for functions with a compatibility implementation. AC_REPLACE_FUNCS([ \ asprintf \ - closefrom \ explicit_bzero \ fmt_scaled \ freezero \ @@ -137,6 +136,10 @@ AC_REPLACE_FUNCS([ \ strtonum \ ]) +# Always use our closefrom because libbsd and FreeBSD implementations have void +# signature, while code expects it to be int. +AC_LIBOBJ(closefrom) + # Always use our getopt because 1) glibc's doesn't enforce argument order 2) # musl does not set optarg to NULL for flags without arguments (although it is # not required to, but it is helpful) 3) there are probably other weird -- 2.34.1