Hey Simon,

ad32ca18a753c264bb702e2b6f19e2d7f1de1612 added 

> +#if defined(HAVE_IDN) || defined(HAVE_LIBIDN2) ||
> defined(LOCALEDIR)
> +#include <locale.h>
> +#endif

above 

> #include "dnsmasq.h"

However, many projects (incl. ours) define the compile-time
options in config.h which is sourced through dnsmasq.h

dnsmasq cannot be compiled within these projects.
The attached patch fixes this.

Best,
Dominik
From 776cdcdad6c8164593804d2b0a3f063923385e7e Mon Sep 17 00:00:00 2001
From: Dominik Derigs <dl...@dl6er.de>
Date: Thu, 7 Oct 2021 09:30:31 +0200
Subject: [PATCH] dnsmasq.h has to be included first as it sources config.h

Signed-off-by: DL6ER <dl...@dl6er.de>
---
 src/dnsmasq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/dnsmasq.c b/src/dnsmasq.c
index d3f2c13..2fe9808 100644
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -17,10 +17,12 @@
 /* Declare static char *compiler_opts  in config.h */
 #define DNSMASQ_COMPILE_OPTS
 
+/* dnsmasq.h has to be included first as it sources config.h */
+#include "dnsmasq.h"
+
 #if defined(HAVE_IDN) || defined(HAVE_LIBIDN2) || defined(LOCALEDIR)
 #include <locale.h>
 #endif
-#include "dnsmasq.h"
 
 struct daemon *daemon;
 
-- 
2.25.1

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to