typedef long int __fd_mask; #define __FD_MASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) 1 can be shifted into the sign position, which isn't legal C. I think we should just use 1UL and cast the result of the shift.
Fixed in commit 4cbf380ce948ca15a965a78f0c1a092cf5956792.