try to get windows poll() shim working

This commit is contained in:
Tenari
2026-04-03 07:28:24 -05:00
parent 1f8e2f3181
commit 75c2b92adb
6 changed files with 102 additions and 24 deletions
+18
View File
@@ -442,7 +442,25 @@ union Range1f32
DWORD input_mode;
DWORD output_mode;
} TermIOs;
// <poll.h> networking shim for windows
# define POLLIN 0x0001
# define POLLPRI 0x0002
# define POLLOUT 0x0004
# define POLLERR 0x0008
# define POLLHUP 0x0010
# define POLLNVAL 0x0020
typedef struct pollfd {
SOCKET fd;
short events;
short revents;
} pollfd_t;
typedef int nfds_t;
int poll(struct pollfd *fds, nfds_t nfds, int timeout);
#else
# include <poll.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <netdb.h>