Skip to content
Snippets Groups Projects
Commit 619fa080 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix warnings and errors on Windows.

Apparently, Windows doesn't have a MSG_DONTWAIT flag to recv().
parent 1f9fc410
No related branches found
No related tags found
No related merge requests found
Pipeline #7998 failed
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "bbslist.h" #include "bbslist.h"
#include "conn.h" #include "conn.h"
#include "sockwrap.h" #include "sockwrap.h"
#include "stdio.h"
#include "syncterm.h" #include "syncterm.h"
#include "uifcinit.h" #include "uifcinit.h"
#include "webget.h" #include "webget.h"
...@@ -122,7 +123,7 @@ recv_line(struct http_session *sess, int timeout, size_t *len) ...@@ -122,7 +123,7 @@ recv_line(struct http_session *sess, int timeout, size_t *len)
set_msg(sess->req, "Socket not readable."); set_msg(sess->req, "Socket not readable.");
goto error_return; goto error_return;
} }
ssize_t rc = recv(sess->sock, &ret[retpos], 1, MSG_DONTWAIT); ssize_t rc = recv(sess->sock, &ret[retpos], 1, 0);
if (rc == -1) { if (rc == -1) {
if (SOCKET_ERRNO == EINTR) if (SOCKET_ERRNO == EINTR)
continue; continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment