mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +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
Notes:
sideshowbarker
2024-07-18 05:24:41 +09:00
Author: https://github.com/petelliott Commit: https://github.com/SerenityOS/serenity/commit/d9ecb3ecfae Pull-request: https://github.com/SerenityOS/serenity/pull/9559
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…
Reference in a new issue