Bug 12502 - source3/lib/messages_dgm.c:363:30: error: 'MSG_NOSIGNAL' undeclared
Summary: source3/lib/messages_dgm.c:363:30: error: 'MSG_NOSIGNAL' undeclared
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.6.0rc1
Hardware: All Solaris
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
: 12812 (view as bug list)
Depends on:
Reported: 2017-01-06 19:23 UTC by Tom Schulz
Modified: 2017-08-07 20:32 UTC (History)
6 users (show)

See Also:

WIP patch for master (1.20 KB, patch)
2017-01-08 08:49 UTC, Ralph Böhme
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Schulz 2017-01-06 19:23:36 UTC
I am trying to build 4.6.0rc1 on a Solaris 10 i386 box. The make fails with:

[1529/3763] Compiling source3/lib/messages_dgm.c
../source3/lib/messages_dgm.c: In function 'messaging_dgm_sendmsg':
../source3/lib/messages_dgm.c:363:30: error: 'MSG_NOSIGNAL' undeclared (first use in this function)

I have verified that Fedora Core 19 defines MSG_NOSIGNAL in
/usr/include/bits/socket.h but Solaris 10 does not define it anywhere.
Comment 1 Ralph Böhme 2017-01-08 08:49:31 UTC
Created attachment 12803 [details]
WIP patch for master
Comment 2 Volker Lendecke 2017-01-08 09:45:25 UTC
https://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly#108192 has a discussion entry that describes how to do this properly on Solaris. Shall we do that?
Comment 3 Ralph Böhme 2017-01-09 11:31:01 UTC
(In reply to Volker Lendecke from comment #2)
Blocking the signal? To do this properly, I guess we'd have to save the current signal mask, block SIGPIPE and then restore the mask. That's quite some overhead.

Can't we just delegate this to the user of the messaging subsystem? As mentioned, must already do block SIGPIPE anyway.
Comment 4 Tom Schulz 2017-01-12 19:14:38 UTC
The patch in attachment 12803 [details] fixes the error. I have not yet tried to run it.
Comment 5 Tom Schulz 2017-03-16 15:45:00 UTC
The patch is not in 4.6.0. So 4.6.0 fails to compile on Solaris.
Comment 6 Tom Schulz 2017-04-05 17:15:39 UTC
The patch is not in 4.6.2. So 4.6.2 fails to compile on Solaris.
Comment 7 Tom Schulz 2017-04-13 17:32:27 UTC
I am retiring, so I will not be able to do any testing in the future.
Comment 8 Stefan Metzmacher 2017-04-13 17:55:17 UTC
(In reply to Tom Schulz from comment #7)

Thanks for all your useful bug reports and testing in the past!

Enjoy your free time!

Comment 9 Jeremy Allison 2017-04-17 17:31:36 UTC
(In reply to Tom Schulz from comment #7)

Tom, we will really miss you and your help with Samba. Enjoy your retirement !
Comment 10 John Thomson 2017-04-29 04:10:48 UTC
I encountered this same error and failed to compile Samba 4.6.3 on SmartOS.
Using the patch in attachment 12803 [details], I was able to compile without this error.

I have not tested my build, and encountered other errors trying to compile with --enable-selftest.
Comment 11 Björn Jacke 2017-06-12 12:32:10 UTC
*** Bug 12812 has been marked as a duplicate of this bug. ***
Comment 12 Robert M Martel 2017-08-07 20:32:23 UTC
4.6.6 on Solaris 10 needed that patch to build.