Skip to content

Commit

Permalink
minor: Fix missing WSAStartup in rtl_tcp pass-through
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Aug 4, 2022
1 parent 34d6eb4 commit 300fcc3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/output_rtltcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,15 @@ struct raw_output *raw_output_rtltcp_create(const char *host, const char *port,
WARN_CALLOC("raw_output_rtltcp_create()");
return NULL; // NOTE: returns NULL on alloc failure.
}
#ifdef _WIN32
WSADATA wsa;

if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0) {
perror("WSAStartup()");
free(rtltcp);
return NULL;
}
#endif

rtltcp->output.output_frame = raw_output_rtltcp_frame;
rtltcp->output.output_free = raw_output_rtltcp_free;
Expand Down

0 comments on commit 300fcc3

Please sign in to comment.