From 7f2b835dd5db4dcfdbe88e238c89084785724925 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 29 Jan 2025 06:28:39 +0100 Subject: Fix struct redefinition error in headers on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- common/smtppass.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'common/smtppass.c') 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 #include "usuals.h" - -#ifdef LINUX_TRANSPARENT_PROXY -#include -#endif - #include "compat.h" #include "sock_any.h" #include "stringx.h" #include "sppriv.h" +#ifdef LINUX_TRANSPARENT_PROXY +#include +#endif + /* ----------------------------------------------------------------------- * STRUCTURES */ -- cgit v1.2.3