summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2025-01-29 06:28:39 +0100
committerStef Walter <stef@thewalter.net>2025-01-29 06:28:39 +0100
commit7f2b835dd5db4dcfdbe88e238c89084785724925 (patch)
tree40329ccabf6a3b818840f7588ebc6fa3999710eb
parent9c21d3312ff12f6d3f56424875ddf13b0c165952 (diff)
Fix struct redefinition error in headers on Linux
Glibc and Linux kernel both contain duplicate definitions of structures like struct sockaddr_in leading to: /usr/include/netinet/in.h:31:8: error: redefinition of ‘struct in_addr’ In file included from /usr/include/linux/netfilter.h:7, from /usr/include/linux/netfilter_ipv4.h:9, from ../common/smtppass.c:64: /usr/include/linux/in.h:94:8: note: originally defined here But we do need to include the linux netfilter definitinos here. Changing the order seems to help
-rw-r--r--common/smtppass.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/smtppass.c b/common/smtppass.c
index d9be1ba..92b7daa 100644
--- a/common/smtppass.c
+++ b/common/smtppass.c
@@ -59,16 +59,15 @@
#include <time.h>
#include "usuals.h"
-
-#ifdef LINUX_TRANSPARENT_PROXY
-#include <linux/netfilter_ipv4.h>
-#endif
-
#include "compat.h"
#include "sock_any.h"
#include "stringx.h"
#include "sppriv.h"
+#ifdef LINUX_TRANSPARENT_PROXY
+#include <linux/netfilter_ipv4.h>
+#endif
+
/* -----------------------------------------------------------------------
* STRUCTURES
*/