summaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-19 10:27:40 -0500
committermidipix <writeonce@midipix.org>2018-12-19 20:16:28 -0500
commit0d929e5cc17857483810f994de5e5334dfc46d02 (patch)
treee4e8addd18f4bc4fb1d9b3dcc9a9e3540ef49cbf /project
parent08042573a31d41f6af669babd9b911b3fd5d2433 (diff)
downloadsbpython2-0d929e5cc17857483810f994de5e5334dfc46d02.tar.bz2
sbpython2-0d929e5cc17857483810f994de5e5334dfc46d02.tar.xz
project: custom config: properly detect getrandom availability.
Diffstat (limited to 'project')
-rw-r--r--project/config/cfgdefs.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
index 750de3a..a94a143 100644
--- a/project/config/cfgdefs.sh
+++ b/project/config/cfgdefs.sh
@@ -105,6 +105,15 @@ cfgdefs_perform_common_tests()
mb_cfgtest_headers='sys/sendfile.h'
cfgtest_interface_presence 'sendfile'
+ # getrandom: easier to simply test,
+ # than to test whether we need to test
+ # (and then test).
+ mb_cfgtest_headers='sys/syscall.h'
+
+ if cfgtest_decl_presence 'SYS_getrandom'; then
+ cfgtest_cflags_append '-DHAVE_GETRANDOM_SYSCALL'
+ fi
+
# ncurses: python refers to members of typedef struct _win_st WINDOW
cfgtest_cflags_append '-DNCURSES_INTERNALS'