Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 6a2cadd6b70cb40ac74fc0d0f8557b914bd38ac2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 2 Jul 2018 13:22:41 +0800 |
| 4 | Subject: [PATCH 09/24] socket-util: don't fail if libc doesn't support IDN |
| 5 | |
| 6 | Upstream-Status: Inappropriate [musl specific] |
| 7 | |
| 8 | Signed-off-by: Emil Renner Berthing <systemd@esmil.dk> |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 11 | --- |
| 12 | src/basic/socket-util.c | 10 ++++++++++ |
| 13 | 1 file changed, 10 insertions(+) |
| 14 | |
| 15 | diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 16 | index 904bafb..a7a009d 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | --- a/src/basic/socket-util.c |
| 18 | +++ b/src/basic/socket-util.c |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 19 | @@ -34,6 +34,16 @@ |
| 20 | #include "user-util.h" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | #include "utf8.h" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | -- |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 37 | 2.11.0 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 38 | |