diff options
Diffstat (limited to 'libnetio')
-rw-r--r-- | libnetio/include/libnetio/netio.h (renamed from libnetio/netio.h) | 6 | ||||
-rw-r--r-- | libnetio/netio_posix.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libnetio/netio.h b/libnetio/include/libnetio/netio.h index 8497330..9383c54 100644 --- a/libnetio/netio.h +++ b/libnetio/include/libnetio/netio.h @@ -1,8 +1,10 @@ #ifndef _NETIO_H_ #define _NETIO_H_ -#include <stdbool.h> /* for bool */ -#include <stdint.h> /* for size_t, ssize_t, uint16_t */ +#include <stdbool.h> /* for bool */ +#include <stdint.h> /* for uint16_t */ +#include <stddef.h> /* for size_t */ +#include <sys/types.h> /* for ssize_t */ /** Return socket-fd on success, -errno on error. */ int netio_listen(uint16_t port); diff --git a/libnetio/netio_posix.c b/libnetio/netio_posix.c index 133b226..2cc6be4 100644 --- a/libnetio/netio_posix.c +++ b/libnetio/netio_posix.c @@ -134,7 +134,7 @@ int netio_accept(int sock) { * while waiting for us to accept(). */ for (;;) { #if CONFIG_NETIO_ISLINUX - cr_sema_wait(&sock->accept_waiters); + cr_sema_wait(&socket_table[sock].accept_waiters); #endif int conn = accept(socket_table[sock].fd, NULL, NULL); if (conn < 0) { |