projects
/
libusual.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c3aba5
)
socket: poll compat fix
author
Marko Kreen
<markokr@gmail.com>
Fri, 21 Jan 2011 11:33:05 +0000
(13:33 +0200)
committer
Marko Kreen
<markokr@gmail.com>
Fri, 21 Jan 2011 11:33:05 +0000
(13:33 +0200)
usual/socket.c
patch
|
blob
|
blame
|
history
diff --git
a/usual/socket.c
b/usual/socket.c
index 77d961e965c460f455f94fb3517b7c1f66e650bd..1b9f6788a81ff793dda9e0ed05cd03beaf886f7f 100644
(file)
--- a/
usual/socket.c
+++ b/
usual/socket.c
@@
-278,8
+278,9
@@
static bool fdbuf_resize(struct fd_buf *buf, int fd)
int alloc = sizeof(fd_set);
#ifdef WIN32
+ int cnt = buf->set ? buf->set->fd_count : 0;
/* win32 fd_set is array of handles, +8 for count&padding */
- need_bytes = (
buf->set->fd_cou
nt + 1) * sizeof(buf->set->fd_array[0]) + 8;
+ need_bytes = (
c
nt + 1) * sizeof(buf->set->fd_array[0]) + 8;
#else
/* otherwise, fd_set is bitmap, +8 for int/long alignment */
need_bytes = fd / 8 + 8;