# HG changeset patch # User Stefan Vogel # Date 1464687892 -7200 # Node ID df79a7806174997ca2d89877f1a9b5692f6a4ef9 # Parent 0b24a97a0bb7a4e3fe6f344f0c2733df6b4cdc38 #BUGFIX by stefan class: UnixOperatingSystem changed: #randomBytesInto: fix for 32-bit linux diff -r 0b24a97a0bb7 -r df79a7806174 UnixOperatingSystem.st --- a/UnixOperatingSystem.st Mon May 30 18:18:57 2016 +0200 +++ b/UnixOperatingSystem.st Tue May 31 11:44:52 2016 +0200 @@ -9180,9 +9180,14 @@ // getrandom() appears first in GLIBC 2.23 // but we define it here until this GLIBC has been deployed on all linux distributions // used by our customers +# if __POINTER_SIZE__ == 8 +# define __flag32 0 +# else +# define __flag32 __X32_SYSCALL_BIT +# endif inline int getrandom(void *buf, size_t buflen, unsigned int flags) { - syscall(SYS_getrandom, buf, buflen, flags); + syscall(SYS_getrandom|__flag32, buf, buflen, flags); } # endif