From: Stefan Sperling Subject: Re: [PATCH portable] portable: build closefrom unconditionally To: Anna “CyberTailor” Cc: gameoftrees@openbsd.org Date: Thu, 9 Dec 2021 16:42:12 +0100 On Thu, Dec 09, 2021 at 08:18:48PM +0500, Anna “CyberTailor” wrote: > From: "Anna (cybertailor) Vyalkova" > > --- > configure.ac | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Hmm, the implementation in compat/closefrom.c is returns void, too. This is a confusing. Shouldn't the compat/closefrom.c wrapper be changed to return int? I wonder how this patch fixes the compiler issue on gentoo otherwise. > 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 > >