Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/dnsmasq: add libidn2 support
@ 2019-06-20 16:23 Fabrice Fontaine
  2019-06-22  7:57 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2019-06-20 16:23 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/dnsmasq/Config.in  | 2 +-
 package/dnsmasq/dnsmasq.mk | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in
index cec68a9eba..d7f3d74bd4 100644
--- a/package/dnsmasq/Config.in
+++ b/package/dnsmasq/Config.in
@@ -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
diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk
index 366cebf012..f271523068 100644
--- a/package/dnsmasq/dnsmasq.mk
+++ b/package/dnsmasq/dnsmasq.mk
@@ -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
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] package/dnsmasq: add libidn2 support
  2019-06-20 16:23 [Buildroot] [PATCH 1/1] package/dnsmasq: add libidn2 support Fabrice Fontaine
@ 2019-06-22  7:57 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-06-22  7:57 UTC (permalink / raw)
  To: buildroot

On Thu, 20 Jun 2019 18:23:24 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> 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
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/dnsmasq/Config.in  | 2 +-
>  package/dnsmasq/dnsmasq.mk | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-22  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 16:23 [Buildroot] [PATCH 1/1] package/dnsmasq: add libidn2 support Fabrice Fontaine
2019-06-22  7:57 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox