Bug 16283 - master fails to build on illumos: lib/replace/system/network.h includes linux/if_packet.h
Summary: master fails to build on illumos: lib/replace/system/network.h includes linux...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: unspecified
Hardware: x64 Solaris
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-10-17 14:56 UTC by Luca Lenardi
Modified: 2026-10-17 14:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Lenardi 2026-10-17 14:56:48 UTC
Since d936340a ("replace: Move packet socket detection from ctdb"),
current master (6365593b) no longer builds on OpenIndiana 2026.04
(illumos, gcc 14). ROKEN_HOSTCC and LIBREPLACE_HOSTCC fail with:

  ../../lib/replace/system/network.h:47:10: fatal error: linux/if_packet.h: No such file or directory

lib/replace/wscript now defines HAVE_PACKETSOCKET with:

  conf.CHECK_CODE('struct sockaddr_ll sall; sall.sll_family = AF_PACKET;',
                  define='HAVE_PACKETSOCKET',
                  headers='sys/socket.h linux/if_packet.h')

CHECK_CODE silently drops the headers that do not exist. On illumos
struct sockaddr_ll and AF_PACKET are available through <sys/socket.h>,
so the check passes without linux/if_packet.h, HAVE_PACKETSOCKET gets
defined and network.h includes <linux/if_packet.h>.

The build environment is the one of the OpenIndiana samba 4.25.0
package, which builds fine; v4-25-stable does not have this check.