Fixed conversion test. Again.
authorMonty Taylor <mordred@inaugust.com>
Mon, 15 Jun 2009 13:21:37 +0000 (13:21 +0000)
committerMonty Taylor <mordred@inaugust.com>
Mon, 15 Jun 2009 13:21:37 +0000 (13:21 +0000)
configure.ac

index 46f235551fdad0e5724df34e755a3b105f58447d..80b63da746e0950d84af55d5db3bef3e2e0c5a44 100644 (file)
@@ -224,14 +224,14 @@ then
   AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons],
     [ac_cv_safe_to_use_Wconversion_],
     [save_CFLAGS="$CFLAGS"
-     CFLAGS="${CC_WARNINGS} ${CFLAGS}"
+     CFLAGS="-Wconversion -Werror ${CFLAGS}"
      AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
          [[
+#include <arpa/inet.h>
 #include <netinet/in.h>
          ]],[[
-size_t source_port= 80;
-uint16_t x= htons((uint16_t)source_port);
+uint16_t x= htons(80);
          ]])],
        [ac_cv_safe_to_use_Wconversion_=yes],
        [ac_cv_safe_to_use_Wconversion_=no])