fix new bsd test

This commit is contained in:
Sergio R. Caprile committed 2026-10-15 14:39:37 -03:00
1 parent c957f29f23
commit 10adde595c
4 files changed
+10 -10

No files matched your search

+2 -2
View File
@@ -828,7 +828,7 @@ static bool bsd_run(struct mg_bsd_cmd *cmd) {
fd_set *w = cmd->op_select.w;
fd_set *e = cmd->op_select.e;
int fd, n = 0, want_read, want_write, want_error, ready;
#if MG_ENABLE_BSD_PROTOTYPES
#if defined(MG_BSD_SELECT_H)
int i;
__fd_mask bits;
int bitsize = (int) (sizeof(bits) * 8);
@@ -841,7 +841,7 @@ static bool bsd_run(struct mg_bsd_cmd *cmd) {
FD_ZERO(&rr);
FD_ZERO(&ww);
FD_ZERO(&ee);
#if MG_ENABLE_BSD_PROTOTYPES
#if defined(MG_BSD_SELECT_H)
for (i = 0; i < (cmd->op_select.nfds + bitsize - 1) / bitsize; i++) {
bits = 0;
if (r != NULL) bits |= r->__fds_bits[i];
+3 -3
View File
@@ -4995,7 +4995,6 @@ void mg_bsd_poll(struct mg_mgr *);
typedef unsigned int socklen_t;
typedef unsigned long nfds_t;
typedef uint32_t in_addr_t;
typedef unsigned long __fd_mask;
struct in_addr { in_addr_t s_addr; };
struct in6_addr { uint8_t s6_addr[16]; };
struct sockaddr { uint16_t sa_family; char sa_data[14]; };
@@ -5032,11 +5031,12 @@ struct addrinfo {
};
struct pollfd { int fd; short events; short revents; };
#if !defined(FD_SET) && !defined(FD_ZERO) && !defined(FD_ISSET)
#define MG_BSD_SELECT_H
typedef unsigned long __fd_mask;
#ifndef FD_SETSIZE
#define FD_SETSIZE 64
#endif
#ifndef FD_ZERO
#define _NFDBITS ((int) sizeof(__fd_mask) * 8)
#define _howmany(x, y) (((x) + ((y) - 1)) / (y))
typedef struct fd_set {
+2 -2
View File
@@ -661,7 +661,7 @@ static bool bsd_run(struct mg_bsd_cmd *cmd) {
fd_set *w = cmd->op_select.w;
fd_set *e = cmd->op_select.e;
int fd, n = 0, want_read, want_write, want_error, ready;
#if MG_ENABLE_BSD_PROTOTYPES
#if defined(MG_BSD_SELECT_H)
int i;
__fd_mask bits;
int bitsize = (int) (sizeof(bits) * 8);
@@ -674,7 +674,7 @@ static bool bsd_run(struct mg_bsd_cmd *cmd) {
FD_ZERO(&rr);
FD_ZERO(&ww);
FD_ZERO(&ee);
#if MG_ENABLE_BSD_PROTOTYPES
#if defined(MG_BSD_SELECT_H)
for (i = 0; i < (cmd->op_select.nfds + bitsize - 1) / bitsize; i++) {
bits = 0;
if (r != NULL) bits |= r->__fds_bits[i];
+3 -3
View File
@@ -63,7 +63,6 @@ void mg_bsd_poll(struct mg_mgr *);
typedef unsigned int socklen_t;
typedef unsigned long nfds_t;
typedef uint32_t in_addr_t;
typedef unsigned long __fd_mask;
struct in_addr { in_addr_t s_addr; };
struct in6_addr { uint8_t s6_addr[16]; };
struct sockaddr { uint16_t sa_family; char sa_data[14]; };
@@ -100,11 +99,12 @@ struct addrinfo {
};
struct pollfd { int fd; short events; short revents; };
#if !defined(FD_SET) && !defined(FD_ZERO) && !defined(FD_ISSET)
#define MG_BSD_SELECT_H
typedef unsigned long __fd_mask;
#ifndef FD_SETSIZE
#define FD_SETSIZE 64
#endif
#ifndef FD_ZERO
#define _NFDBITS ((int) sizeof(__fd_mask) * 8)
#define _howmany(x, y) (((x) + ((y) - 1)) / (y))
typedef struct fd_set {