blob: 16547981d264bb1f37c306818755651f908c03cd [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From a0bd587300744dbb8e9cfbb043233670ce781c98 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 2 Jul 2018 13:22:41 +0800
4Subject: [PATCH 10/19] socket-util: don't fail if libc doesn't support IDN
5
6Upstream-Status: Inappropriate [musl specific]
7
8Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
11---
12 src/basic/socket-util.c | 10 ++++++++++
13 1 file changed, 10 insertions(+)
14
15diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
16index a913102e1..0d0154805 100644
17--- a/src/basic/socket-util.c
18+++ b/src/basic/socket-util.c
19@@ -32,6 +32,16 @@
20 #include "utf8.h"
21 #include "util.h"
22
23+/* Don't fail if the standard library
24+ * doesn't support IDN */
25+#ifndef NI_IDN
26+#define NI_IDN 0
27+#endif
28+
29+#ifndef NI_IDN_USE_STD3_ASCII_RULES
30+#define NI_IDN_USE_STD3_ASCII_RULES 0
31+#endif
32+
33 #if ENABLE_IDN
34 # define IDN_FLAGS NI_IDN
35 #else
36--
372.11.0
38