summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94678e2)
[zj: rename HAVE_IDN to ENABLE_IDN]
#include "string-util.h"
#include "strv.h"
#include "user-util.h"
#include "string-util.h"
#include "strv.h"
#include "user-util.h"
#include "util.h"
#if 0 /// UNNEEDED by elogind
#include "util.h"
#if 0 /// UNNEEDED by elogind
+#ifdef ENABLE_IDN
+# define IDN_FLAGS (NI_IDN|NI_IDN_USE_STD3_ASCII_RULES)
+#else
+# define IDN_FLAGS 0
+#endif
+
int socket_address_parse(SocketAddress *a, const char *s) {
char *e, *n;
unsigned u;
int socket_address_parse(SocketAddress *a, const char *s) {
char *e, *n;
unsigned u;
- r = getnameinfo(&sa->sa, salen, host, sizeof(host), NULL, 0,
- NI_IDN|NI_IDN_USE_STD3_ASCII_RULES);
+ r = getnameinfo(&sa->sa, salen, host, sizeof(host), NULL, 0, IDN_FLAGS);
if (r != 0) {
int saved_errno = errno;
if (r != 0) {
int saved_errno = errno;