summaryrefslogtreecommitdiff
path: root/project/config
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-19 10:27:40 -0500
committermidipix <writeonce@midipix.org>2018-12-19 11:15:00 -0500
commit592c56f44d5faa73068352ebbe61e8f5d6cc8772 (patch)
treea941a91e0dc5f01b0a10c6895a829cde6db09669 /project/config
parente308264b99de5f754d6938c90658e7fcc512dc1e (diff)
downloadsbpython3-592c56f44d5faa73068352ebbe61e8f5d6cc8772.tar.bz2
sbpython3-592c56f44d5faa73068352ebbe61e8f5d6cc8772.tar.xz
project: custom config: properly detect getrandom availability.
Diffstat (limited to 'project/config')
-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'