Changqing Li via Postfix-users:
> [snip of src/util/sys_defs.h]
>
> #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1)
> #define SOCKADDR_SIZE socklen_t
> #define SOCKOPT_SIZE socklen_t
> #else
> #define NO_SNPRINTF
> #endif
>
> For musl lib, #else branch is selected, so NO_SNPRINTF is defined, and
> in vbuf_print.c, if NO_SNPRINTF is defined,
That branch exists solely for compatibility with systems from before 1999.
> But actually, musl lib support snprintf. so maybe it should like this?
>
> -#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1)
> +#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1) || !defined(__GLIBC__)
That would change things like SOCKADDR_SIZE for non-GLIBC systems.
I can certainly do this:
a positive condition like so we keep this:
#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1)
#define SOCKADDR_SIZE socklen_t
#define SOCKOPT_SIZE socklen_t
#endif
That is, delete the NO_SNPRINTF branch. Again that code was for systems
that fell out of support a decade+ ago.
Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]