aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-07-04 18:49:03 -0500
committerRob Landley <rob@landley.net>2018-07-04 18:49:03 -0500
commitff2d528a0a6943bd4247f3c122c145a5b19f0387 (patch)
treee79c2baaa076a33deea48e65cf158b62ec6490da /scripts
parent4d673c9ad4c65c329a85ebb19c2812ae93183099 (diff)
downloadtoybox-ff2d528a0a6943bd4247f3c122c145a5b19f0387.tar.gz
Add xgetrandom() with probe for new system call (else open/read /dev/{,u}random)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/genconfig.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh
index e8df5965..533df600 100755
--- a/scripts/genconfig.sh
+++ b/scripts/genconfig.sh
@@ -105,6 +105,11 @@ EOF
struct rlimit *old_limit);
int main(int argc, char *argv[]) { prlimit(0, 0, 0, 0); }
EOF
+
+ probesymbol TOYBOX_GETRANDOM << EOF
+ #include <sys/random.h>
+ int main(void) { char buf[100]; getrandom(buf, 100, 0); }
+EOF
}
genconfig()