[PATCH 0/1] MR10445: tomcrypt: Treat FreeBSD like Linux
We are currently seeing ``` libs/tomcrypt/mpi.c:5785:24: error: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration] 5785 | d |= ((mp_digit) arc4random()); | ^~~~~~~~~~ ``` even if including <stdlib.h> and setting various standard defines, so simply don't treat FreeBSD specially and go with the Linux code. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10445
From: Gerald Pfeifer <gerald@pfeifer.com> We are currently seeing libs/tomcrypt/mpi.c:5785:24: error: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration] 5785 | d |= ((mp_digit) arc4random()); | ^~~~~~~~~~ even if including <stdlib.h> and setting various standard defines, so simply don't treat FreeBSD specially and go with the Linux code. --- libs/tomcrypt/mpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/tomcrypt/mpi.c b/libs/tomcrypt/mpi.c index c110a78e987..0c2b559b4a4 100644 --- a/libs/tomcrypt/mpi.c +++ b/libs/tomcrypt/mpi.c @@ -5772,7 +5772,7 @@ const size_t mp_s_rmap_reverse_sz = sizeof(mp_s_rmap_reverse); * - *BSD * - Windows */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) +#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) #define MP_ARC4RANDOM #define MP_GEN_RANDOM_MAX 0xffffffffu #define MP_GEN_RANDOM_SHIFT 32 -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10445
I was able to reproduce this when building without a PE cross-compiler, it looks like Wine's own `include/msvcrt/stdlib.h` is being included instead of the system one. Not sure if there's an alternate/good way to fix this. Although we still support building without a PE cross-compiler, I don't think it's recommended. Is there a reason you/this user is building this way? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10445#note_133772
participants (3)
-
Brendan Shanks (@bshanks) -
Gerald Pfeifer -
Gerald Pfeifer (@gerald)