This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

<resolv.h> requires <netinet/in.h>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

This affects both minires-1.02 and Cygwin 1.7.0-34.  STC based on a
configure test:

$ cat > test-resolv.c <<EOF
#include <resolv.h>

int
main (void) {
    return res_ninit (&_res);
}
EOF

$ gcc -Wall -o test-resolv.exe test-resolv.c
In file included from test-resolv.c:1:
/usr/include/resolv.h:162: error: field `nsaddr_list' has incomplete type
/usr/include/resolv.h:172: error: field `addr' has incomplete type
/usr/include/resolv.h:195: error: field `sin' has incomplete type

The missing typedef is sockaddr_in.  Patch attached.


Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkk9o3AACgkQpiWmPGlmQSNjeACg3/FBU9KSNBTigpifYBq4YX3Y
zAMAn2yGnzZryM0g1Qbz0AKq4NnOFjQZ
=NM7d
-----END PGP SIGNATURE-----
2008-Dec-08  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* resolv.h: #include <netinet/in.h> for sockaddr_in typedef.


Index: resolv.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/resolv.h,v
retrieving revision 1.2
diff -u -r1.2 resolv.h
--- resolv.h	17 Jun 2008 10:05:28 -0000	1.2
+++ resolv.h	8 Dec 2008 22:42:27 -0000
@@ -66,6 +66,7 @@
 #include <sys/socket.h>
 #include <stdio.h>
 #include <arpa/nameser.h>
+#include <netinet/in.h>
 
 /*
  * Revision information.  This is the release date in YYYYMMDD format.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]