This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
FreeBSD port (45): resolv.h syntax error
- From: Bruno Haible <bruno at clisp dot org>
- To: Roland McGrath <roland at frob dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 5 Sep 2002 14:15:33 +0200 (CEST)
- Subject: FreeBSD port (45): resolv.h syntax error
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