[exim-cvs] Fix ipv6-less build

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Fix ipv6-less build
Gitweb: https://git.exim.org/exim.git/commitdiff/30afa09ebdb98fdb50fc60f0ce0cb4974bde1225
Commit:     30afa09ebdb98fdb50fc60f0ce0cb4974bde1225
Parent:     362e4161e252f96a7b529d52f650ddc88d1cc9f7
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Aug 10 18:29:26 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat Aug 10 18:29:26 2019 +0100


    Fix ipv6-less build


    Broken-by: de2e5b3dc6
---
 src/src/lookups/spf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


diff --git a/src/src/lookups/spf.c b/src/src/lookups/spf.c
index 6defad7..db2c336 100644
--- a/src/src/lookups/spf.c
+++ b/src/src/lookups/spf.c
@@ -65,9 +65,11 @@ if (!(spf_request = SPF_request_new(spf_server)))

 #if HAVE_IPV6
 switch (string_is_ip_address(filename, NULL))
+#else
+switch (4)
+#endif
   {
   case 4:
-#endif
     if (!SPF_request_set_ipv4_str(spf_request, CS filename))
       break;
     *errmsg = string_sprintf("invalid IPv4 address '%s'", filename);
@@ -83,8 +85,8 @@ switch (string_is_ip_address(filename, NULL))
   default:
     *errmsg = string_sprintf("invalid IP address '%s'", filename);
     return FAIL;
-  }
 #endif
+  }


 if (SPF_request_set_env_from(spf_request, CS keystring))
     {