Skip to content

Commit fc31927

Browse files
Gottoxsaghul
authored andcommitted
Add pointer cast magic to avoid pedantic warnings with gcc-13
The same trick is used on line 689, so I'm considering it reasonable to do the same for js_os_exec_once_init.
1 parent 7891004 commit fc31927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickjs-libc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3115,7 +3115,7 @@ static js_once_t js_os_exec_once = JS_ONCE_INIT;
31153115

31163116
static void js_os_exec_once_init(void)
31173117
{
3118-
js_os_exec_closefrom = dlsym(RTLD_DEFAULT, "closefrom");
3118+
*(void **) (&js_os_exec_closefrom) = dlsym(RTLD_DEFAULT, "closefrom");
31193119
}
31203120

31213121
#endif

0 commit comments

Comments
 (0)