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

Lennart Poettering lennart at poettering.net
Thu Oct 9 11:00:44 PDT 2014


On Thu, 18.09.14 15:24, Emil Renner Berthing (systemd at esmil.dk) wrote:

> ---
>  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

If glibc supports building in a way that these are no defined I am
willing to merge this (though it would belong in missing.h, not into
sockt-util.c). However, I am pretty sure that glibc defines this even
if IDN is disabled in the build, and if that's the case then your libc
should really do the same.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list