_GNU_SOURCE and sys/poll.h

Thorsten Kukuk kukuk@suse.de
Sat Jan 21 08:51:00 GMT 2006


Hi,

The following example:

#define _GNU_SOURCE
#include <sys/poll.h>

fails with the latest changes:

In file included from /usr/include/sys/poll.h:32,
                 from syspoll.c:2:
/usr/include/time.h:120: error: expected specifier-qualifier-list before __time_

Attached a fix for that.

  Thorsten

-- 
Thorsten Kukuk         http://www.suse.de/~kukuk/      kukuk@suse.de
SUSE LINUX Products GmbH       Maxfeldstr. 5       D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B
-------------- next part --------------
2006-01-21  Thorsten Kukuk  <kukuk@suse.de>

	* io/sys/poll.h: Define __need_time_t to get definition
	of time_t if __USE_GNU is defined.

--- io/sys/poll.h
+++ io/sys/poll.h	2006/01/21 08:49:35
@@ -27,7 +27,8 @@
 #ifdef __USE_GNU
 /* Get the __sigset_t definition.  */
 # include <bits/sigset.h>
-/* Get the timespec definition.  */
+/* Get the time_t and timespec definition.  */
+# define __need_time_t
 # define __need_timespec
 # include <time.h>
 #endif


More information about the Libc-hacker mailing list