Description: Don't let XFD_SETSIZE exceed FD_SETSIZE
 This fixes 2c94cdb453bc641246cc8b9a876da9799bee1ce7 on the Hurd, as FD_SETSIZE
 is only 256, and so anyone using XFD_SETSIZE to iterate over the contents of
 an fd_set will overrun the array.
Author: James Clarke <jrtc27@jrtc27.com>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Xpoll.h.in
+++ b/Xpoll.h.in
@@ -67,10 +67,13 @@
 # endif
 #endif
 
-#define XFD_SETSIZE	512
-
-#ifndef FD_SETSIZE
-#define FD_SETSIZE	XFD_SETSIZE
+#if defined(FD_SETSIZE) && FD_SETSIZE < 512
+# define XFD_SETSIZE	FD_SETSIZE
+#else
+# define XFD_SETSIZE	512
+# ifndef FD_SETSIZE
+#  define FD_SETSIZE	XFD_SETSIZE
+# endif
 #endif
 
 #ifndef NBBY
