Skip to contentSkip to conversation

package/dnsmasq: add libidn2 support

PATCH New Fabrice Fontaine 2 participants 2 messages Jun 20, 2019 – Jun 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/dnsmasq: add libidn2 support

libidn2 is preferred over libidn, see src/util.c:
#if defined(HAVE_LIBIDN2)
#include <idn2.h>
#elif defined(HAVE_IDN)
#include <idna.h>
#endif

So select libidn2 if libidn is not enabled

---
 package/dnsmasq/Config.in  | 2 +-
 package/dnsmasq/dnsmasq.mk | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
package/dnsmasq/Config.in +1 -1
index cec68a9eba..d7f3d74bd4 100644
@@ -29,7 +29,7 @@ config BR2_PACKAGE_DNSMASQ_DNSSEC
 
 config BR2_PACKAGE_DNSMASQ_IDN
 	bool "IDN support"
-	select BR2_PACKAGE_LIBIDN
+	select BR2_PACKAGE_LIBIDN2 if !BR2_PACKAGE_LIBIDN
 	help
 	  Enable IDN support in dnsmasq.
 	  This option is a big space taker since it pulls in many
package/dnsmasq/dnsmasq.mk +5 -0
index 366cebf012..f271523068 100644
@@ -34,9 +34,14 @@ DNSMASQ_COPTS += -DNO_TFTP
 endif
 
 ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+DNSMASQ_DEPENDENCIES += libidn2
+DNSMASQ_COPTS += -DHAVE_LIBIDN2
+else
 DNSMASQ_DEPENDENCIES += libidn
 DNSMASQ_COPTS += -DHAVE_IDN
 endif
+endif
 
 ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
 DNSMASQ_DEPENDENCIES += libnetfilter_conntrack
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/dnsmasq: add libidn2 support

Quoted 7 lines · On Thu, 20 Jun 2019 18:23:24 +0200 Fabrice Fontaine…

libidn2 is preferred over libidn, see src/util.c:
#if defined(HAVE_LIBIDN2)
#include <idn2.h>
#elif defined(HAVE_IDN)
#include <idna.h>
#endif

Quoted 7 lines

So select libidn2 if libidn is not enabled

---
 package/dnsmasq/Config.in  | 2 +-
 package/dnsmasq/dnsmasq.mk | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com