Skip to content

Commit

Permalink
autoconf: Fix C99 compatibility issue in the VA_COPY checks
Browse files Browse the repository at this point in the history
The exit function is called without including <stdlib.h>, resulting
in an implicit function declarations.  Future compilers will not
support implicit function declarations by default.  This will lead
to build failures.
  • Loading branch information
fweimer-rh committed Feb 4, 2023
1 parent 39e5d7f commit 8b097d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ AC_MSG_CHECKING(for an implementation of va_copy())
AC_CACHE_VAL(slrn_cv_va_copy,[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdarg.h>
#include <stdlib.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
Expand Down
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -8581,6 +8581,7 @@ else
/* end confdefs.h. */
#include <stdarg.h>
#include <stdlib.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
Expand Down Expand Up @@ -8626,6 +8627,7 @@ else
/* end confdefs.h. */
#include <stdarg.h>
#include <stdlib.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
Expand Down Expand Up @@ -8671,6 +8673,7 @@ else
/* end confdefs.h. */
#include <stdarg.h>
#include <stdlib.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
Expand Down

0 comments on commit 8b097d8

Please sign in to comment.