|
root / base / xlibre-xserver-xorg / patches / 0001-os-meson-sunos-branch-for-hammerhead.patch
0001-os-meson-sunos-branch-for-hammerhead.patch Diff 21 lines 855 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Treat Hammerhead like Solaris/illumos in the os-layer meson build.

Meson derives host_machine.system() from uname sysname, which on Hammerhead
is "hammerhead", not "sunos". The os/ static library's Solaris branch (which
adds -lsocket/-lnsl and the _XOPEN_SOURCE/__EXTENSIONS__ defines needed for
struct msghdr.msg_control and the XPG socket API) therefore never fires,
producing undefined socket()/gethostbyname() symbols at link time. Hammerhead
IS illumos, so extend the guard to match its sysname.

--- a/os/meson.build
+++ b/os/meson.build
@@ -63,7 +63,7 @@
 os_c_args = []
 
 # eg. struct msghdr -> msg_control 
-if host_machine.system() == 'sunos'
+if host_machine.system() == 'sunos' or host_machine.system() == 'hammerhead'
     os_c_args += '-D_XOPEN_SOURCE=1'
     os_c_args += '-D_XOPEN_SOURCE_EXTENDED=1'
     os_c_args += '-D__EXTENSIONS__'