Kill some netdb.h related warnings

Mark Kettenis kettenis@wins.uva.nl
Thu Mar 8 11:57:00 GMT 2001


On the Hurd I need the attached patch to keep the compiler from
warning about `struct timespec' being declared inside a parameter
list.  I suspect one would see the same warning on Linux, but there
might be some subtle difference between Hurd and Linux headers that
hide this problem there.

Mark


2001-03-07  Mark Kettenis  <kettenis@gnu.org>

	* resolv/netdb.h [__USE_GNU]: Define __need_timespec and include
	<time.h> to get definition of `struct timespec'.


Index: resolv/netdb.h
===================================================================
RCS file: /cvs/glibc/libc/resolv/netdb.h,v
retrieving revision 1.35
diff -u -p -r1.35 netdb.h
--- resolv/netdb.h 2001/03/03 18:07:35 1.35
+++ resolv/netdb.h 2001/03/08 19:52:01
@@ -36,6 +36,8 @@
 #ifdef __USE_GNU
 # define __need_sigevent_t
 # include <bits/siginfo.h>
+# define __need_timespec
+# include <time.h>
 #endif
 
 #include <bits/netdb.h>



More information about the Libc-hacker mailing list