-
Notifications
You must be signed in to change notification settings - Fork 31
/
patch-meson.build
42 lines (39 loc) · 1.47 KB
/
patch-meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- meson.build.orig 2022-10-22 10:59:58.476779000 +0200
+++ meson.build 2022-10-31 16:12:58.994390000 +0100
@@ -16,7 +16,7 @@
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
cc_args = []
-if host_machine.system() != 'freebsd'
+if host_machine.system() != 'dragonfly'
cc_args += ['-D_POSIX_C_SOURCE=200809L']
endif
add_project_arguments(cc_args, language: 'c')
@@ -43,7 +43,6 @@
'mkostemp',
'posix_fallocate',
'prctl',
- 'memfd_create',
'mremap',
'strndup',
]
@@ -52,11 +51,11 @@
endforeach
config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>'))
have_broken_msg_cmsg_cloexec = false
-if host_machine.system() == 'freebsd'
+if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
have_broken_msg_cmsg_cloexec = not cc.compiles('''
#include <sys/param.h> /* To get __FreeBSD_version. */
#if __FreeBSD_version < 1300502 || \
- (__FreeBSD_version >= 1400000 && __FreeBSD_version < 1400006)
+ (__FreeBSD_version >= 1400000 && __FreeBSD_version < 1400006) || defined(__DragonFly__)
/*
* FreeBSD had a broken implementation of MSG_CMSG_CLOEXEC between 2015 and
* 2021. Check if we are compiling against a version that includes the fix
@@ -80,8 +79,6 @@
ffi_dep = dependency('libffi')
decls = [
- { 'header': 'sys/signalfd.h', 'symbol': 'SFD_CLOEXEC' },
- { 'header': 'sys/timerfd.h', 'symbol': 'TFD_CLOEXEC' },
{ 'header': 'time.h', 'symbol': 'CLOCK_MONOTONIC' },
]