mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:47:35 +00:00
LibC: Modify fd_set to be compatible with X/OPEN
For some reason X/OPEN requires that fd_set has a field fds_bits. Xproto requires either fds_bits or _fds_bits to be present, so the field 'bits' was renamed 'fds_bits'
This commit is contained in:
parent
6f4324e64e
commit
d9ecb3ecfa
1 changed files with 4 additions and 4 deletions
|
@ -8,12 +8,12 @@
|
|||
|
||||
#define FD_SETSIZE 1024
|
||||
#define FD_ZERO(set) memset((set), 0, sizeof(fd_set));
|
||||
#define FD_CLR(fd, set) ((set)->bits[(fd / 8)] &= ~(1 << (fd) % 8))
|
||||
#define FD_SET(fd, set) ((set)->bits[(fd / 8)] |= (1 << (fd) % 8))
|
||||
#define FD_ISSET(fd, set) ((set)->bits[(fd / 8)] & (1 << (fd) % 8))
|
||||
#define FD_CLR(fd, set) ((set)->fds_bits[(fd / 8)] &= ~(1 << (fd) % 8))
|
||||
#define FD_SET(fd, set) ((set)->fds_bits[(fd / 8)] |= (1 << (fd) % 8))
|
||||
#define FD_ISSET(fd, set) ((set)->fds_bits[(fd / 8)] & (1 << (fd) % 8))
|
||||
|
||||
struct __fd_set {
|
||||
unsigned char bits[FD_SETSIZE / 8];
|
||||
unsigned char fds_bits[FD_SETSIZE / 8];
|
||||
};
|
||||
|
||||
typedef struct __fd_set fd_set;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue