add check for struct pollfd
[bpt/guile.git] / libguile / fports.c
index 10cf671..c1a2800 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- *   2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ *   2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -609,7 +609,7 @@ fport_input_waiting (SCM port)
      highest numerical value of file descriptors that can be monitored.
      Thus, use poll(2) whenever that is possible.  */
 
-#ifdef HAVE_POLL
+#if defined(HAVE_POLL) && defined(HAVE_STRUCT_POLLFD)
   struct pollfd pollfd = { fdes, POLLIN, 0 };
 
   if (poll (&pollfd, 1, 0) < 0)