summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-10-09 05:43:07 -0700
committerirungentoo <irungentoo@gmail.com>2013-10-09 05:43:07 -0700
commitf5179afe4c1e4fb96cd7536327887e3211d22075 (patch)
tree4fe6aa6127c52c0d7cdc0ff11d466c1a260f2e05 /toxcore
parent4aa507b664a457e323011b2f37657c8327057366 (diff)
parenta60ffa9591a680bd1614985749e83ab043e40fe5 (diff)
Merge pull request #616 from naxuroqa/master
fix for missing EAGAIN definition on windows
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/network.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index 51f064e7..38adc179 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -212,9 +212,12 @@ int sendpacket(Networking_Core *net, IP_Port ip_port, uint8_t *data, uint32_t le
212 212
213 if (res == length) 213 if (res == length)
214 net->send_fail_eagain = 0; 214 net->send_fail_eagain = 0;
215#ifdef WIN32
216 else if ((res < 0) && (errno == WSAEWOULDBLOCK))
217#else
215 else if ((res < 0) && (errno == EAGAIN)) 218 else if ((res < 0) && (errno == EAGAIN))
216 net->send_fail_eagain = current_time(); 219#endif
217 220 net->send_fail_eagain = current_time();
218 return res; 221 return res;
219} 222}
220 223