Skip to content

Commit 47500ca

Browse files
authored
Merge pull request #151 from yuchanns/fix-build
restore unix non-blocking helper for sockevent
2 parents a687427 + 8e51828 commit 47500ca

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/sockevent.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ static const socket_t socket_invalid = -1;
3737

3838
#define closesocket close
3939

40+
static inline int
41+
none_blocking_(socket_t fd) {
42+
return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
43+
}
44+
4045
static inline void sockevent_initsocket() {}
4146

4247
#endif

0 commit comments

Comments
 (0)