#BUGFIX by stefan
class: UnixOperatingSystem
changed: #randomBytesInto:
fix for 32-bit linux
--- 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