[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stdio: Fix compilation error on DragonFly BSD
From: |
Bruno Haible |
Subject: |
stdio: Fix compilation error on DragonFly BSD |
Date: |
Sun, 23 May 2021 02:03:23 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) |
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 <bruno@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));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- stdio: Fix compilation error on DragonFly BSD,
Bruno Haible <=