0002-configure.in-Allow-to-override-the-INADDR_NONE-check.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From a6817677a42d1294f1a3ce7b9f46b10ec557ddfa Mon Sep 17 00:00:00 2001
  2. From: Romain Naour <romain.naour@smile.fr>
  3. Date: Sun, 1 Apr 2018 15:23:59 +0200
  4. Subject: [PATCH] configure.in: Allow to override the INADDR_NONE check
  5. Prevent configure script from trying to run programs in a cross
  6. compilation environment to check if INADDR_NONE is defined.
  7. In the context of Buildroot, INADDR_NONE is always defined.
  8. The snort package will set have_inaddr_none=yes in
  9. SNORT_CONF_ENV.
  10. Signed-off-by: Romain Naour <romain.naour@smile.fr>
  11. Cc: Sergio Prado <sergio.prado@e-labworks.com>
  12. ---
  13. configure.in | 4 ++--
  14. 1 file changed, 2 insertions(+), 2 deletions(-)
  15. diff --git a/configure.in b/configure.in
  16. index 1e940b1..938409f 100644
  17. --- a/configure.in
  18. +++ b/configure.in
  19. @@ -284,8 +284,8 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,int64_t])
  20. AC_CHECK_TYPES([boolean])
  21. # In case INADDR_NONE is not defined (like on Solaris)
  22. +AC_CACHE_CHECK([for INADDR_NONE], [have_inaddr_none], [
  23. have_inaddr_none="no"
  24. -AC_MSG_CHECKING([for INADDR_NONE])
  25. AC_RUN_IFELSE(
  26. [AC_LANG_PROGRAM(
  27. [[
  28. @@ -298,7 +298,7 @@ AC_RUN_IFELSE(
  29. return 0;
  30. ]])],
  31. [have_inaddr_none="yes"],
  32. -[have_inaddr_none="no"])
  33. +[have_inaddr_none="no"])])
  34. AC_MSG_RESULT($have_inaddr_none)
  35. if test "x$have_inaddr_none" = "xno"; then
  36. AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition])
  37. --
  38. 2.14.3