Building a testdir on DragonFly BSD 6.0, I see this error: In file included from ../../gltests/test-stdio-c++.cc:22: ../gllib/stdio.h: In member function 'gnulib::_gl_fcloseall_wrapper::operator gnulib::_gl_fcloseall_wrapper::type() const': ../gllib/stdio.h:755:1: error: invalid conversion from 'void (*)()' to 'gnulib::_gl_fcloseall_wrapper::type' {aka 'int (*)()'} [-fpermissive] _GL_CXXALIAS_SYS (fcloseall, int, (void)); ^~~~~~~~~~~~~~~~
This patch fixes it. 2021-05-22 Bruno Haible <br...@clisp.org> stdio: Fix compilation error on DragonFly BSD. * lib/stdio.in.h (fcloseall): Treat DragonFly BSD like FreeBSD. diff --git a/lib/stdio.in.h b/lib/stdio.in.h index bbe7084..4dfa339 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -242,7 +242,7 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " _GL_CXXALIAS_MDA (fcloseall, int, (void)); # else # if @HAVE_DECL_FCLOSEALL@ -# if defined __FreeBSD__ +# if defined __FreeBSD__ || defined __DragonFly__ _GL_CXXALIAS_SYS (fcloseall, void, (void)); # else _GL_CXXALIAS_SYS (fcloseall, int, (void));