[systemd-devel] [RFC 09/25] shared/socket-util: don't fail if libc doesn't support IDN

Emil Renner Berthing systemd at esmil.dk
Thu Sep 18 06:24:45 PDT 2014


---
 src/shared/socket-util.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c
index e3e54e8..d4a1679 100644
--- a/src/shared/socket-util.c
+++ b/src/shared/socket-util.c
@@ -41,6 +41,16 @@
 #include "missing.h"
 #include "fileio.h"
 
+/* Don't fail if the standard library
+ * doesn't support IDN */
+#ifndef NI_IDN
+#define NI_IDN 0
+#endif
+
+#ifndef NI_IDN_USE_STD3_ASCII_RULES
+#define NI_IDN_USE_STD3_ASCII_RULES 0
+#endif
+
 int socket_address_parse(SocketAddress *a, const char *s) {
         char *e, *n;
         unsigned u;
-- 
2.1.0



More information about the systemd-devel mailing list