CMSG_LEN, CMSG_SPACE not there on illumos

Gordon Ross gordon.w.ross at
Wed Apr 29 11:44:42 MDT 2015

Oh, git format patch makes the comments hard to read, so here they are:

On Wed, Apr 29, 2015 at 1:38 PM, Gordon Ross <gordon.w.ross at> wrote:
> Yes, thanks.  That doesn't seem to be on master though, is it?
> Here's a collection of patches that let me run the waf configure
> and make smbtorture4.   The waf patches are definitely not "polished"
> but worked for me.
> The others could probably be integrated if you like.
> On Wed, Apr 29, 2015 at 12:18 PM, Ralph Böhme <rb at> wrote:
>> On Wed, Apr 29, 2015 at 12:07:40PM -0400, Gordon Ross wrote:
>>> Nevermind about CMSG_LEN, CMSG_SPACE being missing.
>>> They're right there in sys/socket.h but only exposed if XPG4v2 or later,
>>> so Samba needs to use -D_XOPEN_SOURCE=600
>>> I took a stab a changing that, and ran into the "fun" of waf in
>>> buildtools/wafsamba/wscript ...
>>> I'll send my attempt at fixing this later...
>> it seems you missed this one:
>> <>
>> -Ralph
>> --
>> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
>> phone: +49-551-370000-0, fax: +49-551-370000-9
>> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
-------------- next part --------------
commit 3b881b6f7ccab968ad8536771e998b8c62c7470b
Author: Gordon Ross <gwr at>
Date:   Tue Apr 28 12:29:09 2015 -0400

    Some systems define ERR as something.  illumos does in:
    /usr/include/sys/regset.h when __EXTENSIONS__ is defined,
    which we want for other things.  Yeah, it would be better
    if this header were not polluting the namespace so much.
    ../source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c: In function ‘mp_karatsuba_mul’:
    ../source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c:63: error: expected identifier or ‘*’ before numeric constant
    ../source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c:160: warning: statement with no effect
    ../source4/heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c:160: error: expected ‘;’ before ‘:’ token

3	0	source4/heimdal/lib/hcrypto/libtommath/tommath.h

commit 4f7f2c9dfeae18bee2e9bb2aaa6dd135b33477dc
Author: Gordon Ross <gwr at>
Date:   Tue Apr 28 12:09:46 2015 -0400

    Fix compile error:
    ../lib/tevent/tevent_port.c: In function ‘associate_all_events’:
    ../lib/tevent/tevent_port.c:180: error: ISO C90 forbids mixed declarations and code

2	1	lib/tevent/tevent_port.c

commit aa0e6ae5f0e827f5b2bc50f418557865f54baa95
Author: Gordon Ross <gwr at>
Date:   Tue Apr 28 12:08:31 2015 -0400

    Fix compile error
    ../source4/torture/rpc/samlogon.c: In function ‘test_InteractiveLogon’:
    ../source4/torture/rpc/samlogon.c:1522: error: ‘status’ may be used uninitialized in this function

2	1	source4/torture/rpc/samlogon.c

commit 760097d2d57d386887e78d7664b04f2981743f25
Author: Gordon Ross <gwr at>
Date:   Tue Apr 28 12:06:08 2015 -0400

    Deal with illumos/Solaris versions of getpwent_r etc.

30	0	source4/torture/local/nss_tests.c

commit 7ed95d4eeab08df73b0de4485b46a73cabd2f8ec
Author: Gordon Ross <gwr at>
Date:   Tue Apr 28 12:03:47 2015 -0400

    illumos needs -D_XOPEN_SOURCE=600 -D_XPG6 etc.
    Also CFLAGS=-std=c99 for gcc 4.4.4 but I was unable to get
    waf to pass that via wscript changes and had to just
    set that in the environment...

10	0	buildtools/wafsamba/wscript

More information about the samba-technical mailing list