Fwd: CMSG_LEN, CMSG_SPACE not there on illumos

Gordon Ross gordon.w.ross at gmail.com
Tue Apr 28 08:41:15 MDT 2015


Hi all,

I tried building master on illumos a few days ago and I noticed that
this commit introduces some new places using CMSG_LEN, CMSG_SPACE etc.
which are not provided on illumos (and probably not on Solaris, but
I'm not sure about that).

  commit 190554c402f23a9eff1f20670e66f7b94a36b396
  Author: Volker Lendecke <vl at samba.org>
  Date:   Tue Dec 30 13:36:46 2014 +0000
    lib: Add msghdr.[ch]
    This is a little set of routines to deal with the ugly fd-passing macros.

I could attempt fixing this, but need some guidance.  I saw reference
to a standard defining CMSG_LEN, CMSG_SPACE etc. but I only found
Linux or BSD man pages etc.  Is these part of any official standard?
If so, can someone provide the URL?

In some previous email on this list, Jeremy posted some Solaris
patches that introduced an #ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL to
deal with this in source3/lib/unix_msg.c.

If I go the "add another #ifdef" route, what's the appropriate thing to do here?
I looked the the unix_msg.c changes and it seems that the
#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL just omits all the code related
to FD passing.  Does that work?   Is that not needed?
If it helps, illumos _does_ support FD passing via control messages,
just not these CMSG_LEN, CMSG_SPACE macros etc.

Any help and advice appreciated.

Thanks,
Gordon


More information about the samba-technical mailing list