Fix compilation of rigctld.c on mingw

pull/519/head^2
Michael Black W9MDB 2021-01-24 17:19:58 -06:00
rodzic b5c60e50fb
commit 1b89407a8d
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -972,6 +972,7 @@ int main(int argc, char *argv[])
static FILE*get_fsockout(struct handle_data *handle_data_arg)
{
#ifdef __MINGW32__
int sock_osfhandle = _open_osfhandle(handle_data_arg->sock, _O_RDONLY);
return _fdopen(sock_osfhandle, "wb");
#else
return fdopen(handle_data_arg->sock, "wb");
@ -986,7 +987,7 @@ static FILE* get_fsockin(struct handle_data *handle_data_arg)
if (sock_osfhandle == -1)
{
rig_debug(RIG_DEBUG_ERR, "_open_osfhandle error: %s\n", strerror(errno));
goto handle_exit;
return NULL;
}
return _fdopen(sock_osfhandle, "rb");