diff --git a/headers/posix/sys/select.h b/headers/posix/sys/select.h index 3f41e137ce..87ae4c1554 100644 --- a/headers/posix/sys/select.h +++ b/headers/posix/sys/select.h @@ -26,18 +26,10 @@ typedef __haiku_uint32 fd_mask; -#ifndef _howmany -# define _howmany(x, y) (((x) + ((y) - 1)) / (y)) -#endif - -#ifndef howmany -# define howmany(x, y) (((x) + ((y) - 1)) / (y)) -#endif - #define NFDBITS (sizeof(fd_mask) * 8) /* bits per mask */ typedef struct fd_set { - fd_mask bits[_howmany(FD_SETSIZE, NFDBITS)]; + fd_mask bits[((FD_SETSIZE) + ((NFDBITS) - 1)) / (NFDBITS)]; } fd_set; #define _FD_BITSINDEX(fd) ((fd) / NFDBITS) @@ -54,6 +46,7 @@ typedef struct fd_set { #endif /* FD_SET */ + #ifdef __cplusplus extern "C" { #endif