diff -Naur glibc-2.12.2-old/misc/sys/select.h glibc-2.12.2-new/misc/sys/select.h
--- glibc-2.12.2-old/misc/sys/select.h	2010-12-13 02:47:26.000000000 -0800
+++ glibc-2.12.2-new/misc/sys/select.h	2010-12-13 17:46:02.000000000 -0800
@@ -52,7 +52,7 @@
 
 
 /* The fd_set member is required to be an array of longs.  */
-typedef long int __fd_mask;
+typedef unsigned long int __fd_mask;
 
 /* Some versions of <linux/posix_types.h> define these macros.  */
 #undef	__NFDBITS
@@ -60,8 +60,8 @@
 #undef	__FDMASK
 /* It's easier to assume 8-bit bytes than to get CHAR_BIT.  */
 #define __NFDBITS	(8 * (int) sizeof (__fd_mask))
-#define	__FDELT(d)	((d) / __NFDBITS)
-#define	__FDMASK(d)	((__fd_mask) 1 << ((d) % __NFDBITS))
+#define	__FDELT(d)	(((unsigned long int)d) / __NFDBITS)
+#define	__FDMASK(d)	((__fd_mask) 1 << (((unsigned long int)d) % __NFDBITS))
 
 /* fd_set for select and pselect.  */
 typedef struct
