FreeBSD port (45): resolv.h syntax error
Bruno Haible
bruno@clisp.org
Thu Sep 5 05:13:00 GMT 2002
When compiling linuxthreads, resolv/resolv.h gives a compilation error when
included with __need_res_state set, because it uses the type 'u_long' but
doesn't always include <sys/types.h>:
In file included from ../include/resolv.h:11,
from descr.h:19,
from internals.h:29,
from condvar.c:23:
../resolv/resolv.h:76: warning: type defaults to `int' in declaration of `u_char'
../resolv/resolv.h:76: parse error before '*' token
2002-09-04 Bruno Haible <bruno@clisp.org>
* resolv/resolv.h: Always include <sys/types.h>.
diff -r -c3 glibc-20020828.bak/resolv/resolv.h glibc-20020828/resolv/resolv.h
*** glibc-20020828.bak/resolv/resolv.h Mon Aug 5 13:24:37 2002
--- glibc-20020828/resolv/resolv.h Fri Aug 30 11:04:32 2002
***************
*** 54,69 ****
# define _RESOLV_H_
# include <sys/param.h>
- # if (!defined(BSD)) || (BSD < 199306)
- # include <sys/bitypes.h>
- # else
- # include <sys/types.h>
- # endif
# include <sys/cdefs.h>
# include <stdio.h>
# include <arpa/nameser.h>
#endif
#include <netinet/in.h>
#ifndef __res_state_defined
--- 54,65 ----
# define _RESOLV_H_
# include <sys/param.h>
# include <sys/cdefs.h>
# include <stdio.h>
# include <arpa/nameser.h>
#endif
+ #include <sys/types.h>
#include <netinet/in.h>
#ifndef __res_state_defined
More information about the Libc-alpha
mailing list