Fix bug 4248 “Suport C99 compilers in m4/spamassassin.m4”
[claws.git] / m4 / spamassassin.m4
index 45882f39e78dbcd371cfcb603fbe8151973a29bf..c70228ca663aa36bb6baa47c4a5e51b95a8322b4 100644 (file)
@@ -13,6 +13,7 @@ AC_CHECK_HEADERS(time.h sysexits.h sys/socket.h netdb.h netinet/in.h)
 AC_CACHE_CHECK([for SHUT_RD],
        spamassassin_cv_has_shutrd, [
                 AC_TRY_COMPILE([#include <sys/types.h>
+#include <stdio.h>
 #include <sys/socket.h>],
                         [printf ("%d", SHUT_RD); return 0;],
                                         [spamassassin_cv_has_shutrd=yes],
@@ -30,7 +31,9 @@ dnl ----------------------------------------------------------------------
 
 AC_CACHE_CHECK([for h_errno],
         spamassassin_cv_has_herrno, [
-                AC_TRY_COMPILE([#include <netdb.h>],
+                AC_TRY_COMPILE([#include <netdb.h>
+#include <stdio.h>
+],
                         [printf ("%d", h_errno); return 0;],
                                         [spamassassin_cv_has_herrno=yes],
                                         [spamassassin_cv_has_herrno=no]),