summaryrefslogtreecommitdiff
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
parente308264b99de5f754d6938c90658e7fcc512dc1e (diff)
downloadsbpython3-592c56f44d5faa73068352ebbe61e8f5d6cc8772.tar.bz2
sbpython3-592c56f44d5faa73068352ebbe61e8f5d6cc8772.tar.xz
project: custom config: properly detect getrandom availability.
-rw-r--r--profiles/osapi/linux.h1
-rw-r--r--profiles/osapi/midipix.h3
-rw-r--r--project/config/cfgdefs.sh9
3 files changed, 9 insertions, 4 deletions
diff --git a/profiles/osapi/linux.h b/profiles/osapi/linux.h
index 54d5142..38893ec 100644
--- a/profiles/osapi/linux.h
+++ b/profiles/osapi/linux.h
@@ -6,7 +6,6 @@
/* interfaces */
#define HAVE_EPOLL 1
-#define HAVE_GETRANDOM_SYSCALL 1
#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1
#define HAVE_SOCKADDR_ALG 1
diff --git a/profiles/osapi/midipix.h b/profiles/osapi/midipix.h
index 90bf421..0c3300a 100644
--- a/profiles/osapi/midipix.h
+++ b/profiles/osapi/midipix.h
@@ -6,9 +6,6 @@
#define HAVE_DIRENT_H 1
#define HAVE_NETPACKET_PACKET_H 1
-/* interfaces */
-#define HAVE_GETRANDOM_SYSCALL 1
-
/* os characteristics */
#define RETSIGTYPE void
#define SHLIB_EXT ".so"
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'