from my change in debian mksh-29.6-2: if arc4random exists, use it
This commit is contained in:
parent
eb47c62e8d
commit
f9b33dffea
13
Build.sh
13
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $MirOS: src/bin/mksh/Build.sh,v 1.211 2007/06/09 22:06:55 tg Exp $
|
# $MirOS: src/bin/mksh/Build.sh,v 1.212 2007/06/10 17:06:07 tg Exp $
|
||||||
#-
|
#-
|
||||||
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
||||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NEED_MKNOD MKSH_NOPWNAM
|
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NEED_MKNOD MKSH_NOPWNAM
|
||||||
@ -572,7 +572,7 @@ EOF
|
|||||||
#
|
#
|
||||||
# Environment: library functions
|
# Environment: library functions
|
||||||
#
|
#
|
||||||
ac_test arc4random <<-'EOF'
|
ac_testn arc4random <<-'EOF'
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if HAVE_STDINT_H
|
#if HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -581,6 +581,15 @@ ac_test arc4random <<-'EOF'
|
|||||||
int main(void) { return (arc4random()); }
|
int main(void) { return (arc4random()); }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
if test $HAVE_ARC4RANDOM = 0 && test -f "$srcdir/arc4random.c"; then
|
||||||
|
ac_header sys/sysctl.h
|
||||||
|
addsrcs HAVE_ARC4RANDOM arc4random.c
|
||||||
|
HAVE_ARC4RANDOM=1
|
||||||
|
HAVE_ARC4RANDOM_DECL=0
|
||||||
|
HAVE_ARC4RANDOM_PUSH=0
|
||||||
|
fi
|
||||||
|
CPPFLAGS="$CPPFLAGS -DHAVE_ARC4RANDOM=$HAVE_ARC4RANDOM"
|
||||||
|
|
||||||
ac_test arc4random_push arc4random 0 <<-'EOF'
|
ac_test arc4random_push arc4random 0 <<-'EOF'
|
||||||
extern void arc4random_push(int);
|
extern void arc4random_push(int);
|
||||||
int main(void) { arc4random_push(1); return (0); }
|
int main(void) { arc4random_push(1); return (0); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user