On 19/01/18 16:32, Michael Richardson wrote:
> Matt Caswell <m...@openssl.org> wrote:
>     > Please raise a separate PR for this work. It *must* be portable though
>     > and work across all our platforms (e.g. including VisualC etc). My
>     > suggestion is that your BIO_CTRL_DGRAM_GET_ADDR/BIO_CTRL_DGRAM_SET_ADDR
>     > ctrls should return an error on platforms that we don't know we can
>     > support, i.e. attempt to detect (at compile time) whether we are on a
>     > platform that we know has the required system calls - if we are then use
>     > them, otherwise we do things the old way.
>     > Note that stuff like this is problematic:
>     > char __attribute__((aligned(8))) chdr[CMSG_SPACE(sizeof(struct
>     > in_pktinfo))];
>     > The "attribute" is compiler specific and not something we can rely on to
>     > be available. Additionally "CMSG_SPACE" is probably not portable, and in
>     > any case may not evaluate to a compile time constant (according to the
>     > man page), so this is not C90 (which is a requirement for OpenSSL
>     > submissions).
> Understood.
> I think that CMSG_SPACE might be in the POSIX spec, but I'll double check.
> What do you suggest I do for the IPv4 stuff, which has no POSIX standard?
> A bunch of #ifdef on OS definitions?

If its non portable and we're not already using it then that's the
probably the best we can do. We should try and provide some sensible
fallback wherever possible. Or if not possible it shouldn't break
anything that already works.

openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to