Skip to content

Commit

Permalink
buildsys: Make sure NULL is defined before we use it in tests
Browse files Browse the repository at this point in the history
Several tests use NULL without including <stdlib.h>.  Fix this.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
  • Loading branch information
cernekee committed Jan 8, 2015
1 parent e0ab6fd commit 0629ea5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ if test $enable_gui = yes; then
LIBS="$LIBS $GTK_LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"

AC_TRY_LINK([#include <gtk/gtk.h>], [gtk_init(NULL,NULL);],
AC_TRY_LINK([#include <gtk/gtk.h>
#include <stdlib.h>],
[gtk_init(NULL,NULL);],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([unable to link gtk+ test program])])
LIBS="$saved_LIBS"
Expand Down Expand Up @@ -173,7 +175,8 @@ if test "$with_tomcrypt" != no -a "$with_nettle" != yes; then
CFLAGS="$CFLAGS $CRYPTO_CFLAGS"

AC_MSG_CHECKING([if libtomcrypt is usable])
AC_TRY_LINK([#include <tomcrypt.h>],
AC_TRY_LINK([#include <tomcrypt.h>
#include <stdlib.h>],
[rijndael_ecb_encrypt(NULL,NULL,NULL);
ltc_mp = ltm_desc;
register_hash(&sha1_desc);],
Expand Down

0 comments on commit 0629ea5

Please sign in to comment.