From 04c8be41fd665178c1b524ec3d6cde4756148cd2 Mon Sep 17 00:00:00 2001 From: Dennis Bonke Date: Fri, 2 Aug 2024 16:33:57 +0200 Subject: [PATCH] options/posix: Stub jrand48 --- options/posix/generic/posix_stdlib.cpp | 5 +++++ options/posix/include/bits/posix/posix_stdlib.h | 1 + 2 files changed, 6 insertions(+) diff --git a/options/posix/generic/posix_stdlib.cpp b/options/posix/generic/posix_stdlib.cpp index 6cced1adb3..c075aa4091 100644 --- a/options/posix/generic/posix_stdlib.cpp +++ b/options/posix/generic/posix_stdlib.cpp @@ -116,6 +116,11 @@ void srand48(long int seed) { seed48(arr); } +long jrand48(unsigned short [3]) { + __ensure(!"Not implemented"); + __builtin_unreachable(); +} + // Borrowed from musl void srandom(unsigned int seed) { int k; diff --git a/options/posix/include/bits/posix/posix_stdlib.h b/options/posix/include/bits/posix/posix_stdlib.h index e58fb86d6b..b1042674cf 100644 --- a/options/posix/include/bits/posix/posix_stdlib.h +++ b/options/posix/include/bits/posix/posix_stdlib.h @@ -15,6 +15,7 @@ long random(void); double drand48(void); double erand48(unsigned short s[3]); void srand48(long int); +long jrand48(unsigned short s[3]); char *initstate(unsigned int, char *, size_t); char *setstate(char *); void srandom(unsigned int);