]> Savannah Git Hosting - gnulib.git/commitdiff
link: fix test to declare use of rename()
authorJohn W. Eaton <gnu@jweaton.org>
Tue, 13 Dec 2016 17:43:09 +0000 (12:43 -0500)
committerPádraig Brady <P@draigBrady.com>
Tue, 13 Dec 2016 19:17:49 +0000 (19:17 +0000)
The test in link.m4 needs to include <stdio.h> to provide a declaration
for the rename function.  The test fails if building with GCC's
-Werror=implicit-function-declaration option.

This was reported as part of a bug with building Octave on Fedora, which
now uses -Werror=implicit-function-declaration by default.

* m4/link.m4 (gl_FUNC_LINK): Include <stdio.h>.

https://savannah.gnu.org/bugs/?49782

ChangeLog
m4/link.m4

index a5e6f7ebbc4629cec37e8a0002f902774a99e33c..51b89eff58b78000fb2f29d9b6f225376f77f49a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-13  John W. Eaton  <gnu@jweaton.org>
+
+       link: fix test to declare use of rename()
+       * m4/link.m4 (gl_FUNC_LINK): Include <stdio.h> needed with
+       -Werror=implicit-function-declaration
+
 2016-12-12  Bruno Haible  <bruno@clisp.org>
 
        fpending: Port to native Windows with MSVC.
index 77f5a2b9c0fa621a3746965006ff9ca719a09f50..34e770889813c908fcc71bc1adee50a2765445ec 100644 (file)
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_LINK],
        AC_RUN_IFELSE(
          [AC_LANG_PROGRAM(
            [[#include <unistd.h>
+             #include <stdio.h>
            ]],
            [[int result = 0;
              if (!link ("conftest.a", "conftest.b/"))