error: conflicting types for 'setmode'
error compiling on windows with msys2/mingw following the procedure from 'https://gitlab.freedesktop.org/libbsd/libbsd/merge_requests/1'
In file included from ../include/bsd/getopt.h:32,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/unistd.h:12,
from ../include/bsd/unistd.h:31,
from arc4random.c:33:
../include/bsd/unistd.h:60:7: error: conflicting types for 'setmode'; have 'void *(const char *)'
60 | void *setmode(const char *mode_str);
| ^~~~~~~
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/fcntl.h:8,
from arc4random.c:27:
C:/msys64/mingw64/x86_64-w64-mingw32/include/io.h:342:15: note: previous declaration of 'setmode' with type 'int(int, int)'
342 | int __cdecl setmode(int _FileHandle,int _Mode) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
| ^~~~~~~