blob: 96fc3d8448105dccba983a1bf1403b778df3f682 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 71e710a6c8a3879af7d50c4cb995e0615deba5c3 Mon Sep 17 00:00:00 2001
2From: Emil Renner Berthing <systemd@esmil.dk>
3Date: Sat, 12 Sep 2015 19:56:52 +0000
4Subject: [PATCH 29/38] socket-util: don't fail if libc doesn't support IDN
5
6Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9Upstream-Status: Pending
10
11 src/basic/socket-util.c | 9 +++++++++
12 1 file changed, 9 insertions(+)
13
14diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
15index 5851268..aefaca5 100644
16--- a/src/basic/socket-util.c
17+++ b/src/basic/socket-util.c
18@@ -44,6 +44,15 @@
19 #include "string-util.h"
20 #include "user-util.h"
21 #include "util.h"
22+/* Don't fail if the standard library
23+ * doesn't support IDN */
24+#ifndef NI_IDN
25+#define NI_IDN 0
26+#endif
27+
28+#ifndef NI_IDN_USE_STD3_ASCII_RULES
29+#define NI_IDN_USE_STD3_ASCII_RULES 0
30+#endif
31
32 int socket_address_parse(SocketAddress *a, const char *s) {
33 char *e, *n;
34--
351.8.3.1
36