Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From 71e710a6c8a3879af7d50c4cb995e0615deba5c3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Emil Renner Berthing <systemd@esmil.dk> |
| 3 | Date: Sat, 12 Sep 2015 19:56:52 +0000 |
| 4 | Subject: [PATCH 29/38] socket-util: don't fail if libc doesn't support IDN |
| 5 | |
| 6 | Signed-off-by: Emil Renner Berthing <systemd@esmil.dk> |
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 8 | --- |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | src/basic/socket-util.c | 9 +++++++++ |
| 12 | 1 file changed, 9 insertions(+) |
| 13 | |
| 14 | diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c |
| 15 | index 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 | -- |
| 35 | 1.8.3.1 |
| 36 | |