summaryrefslogtreecommitdiffstats
path: root/src/include/port-sockets.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-07-16 21:12:30 +0000
committerKen Raeburn <raeburn@mit.edu>2004-07-16 21:12:30 +0000
commitd854ba33a385e428ad8a2ec0bbb4c79a7afbdf58 (patch)
tree38f0399955808db6cb8c838a4e48dbab5f78ee82 /src/include/port-sockets.h
parentb9425d8f98d395095a7cf98d4a7408b8cd844998 (diff)
downloadkrb5-d854ba33a385e428ad8a2ec0bbb4c79a7afbdf58.tar.gz
krb5-d854ba33a385e428ad8a2ec0bbb4c79a7afbdf58.tar.xz
krb5-d854ba33a385e428ad8a2ec0bbb4c79a7afbdf58.zip
* fake-addrinfo.h: Don't include netdb.h, since port-sockets.h already does.
* port-sockets.h: Define _XOPEN_SOURCE_EXTENDED around inclusion of netdb.h if it's not defined and not Windows, as fake-addrinfo.h used to do; otherwise just include it normally. ticket: 2379 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16608 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/port-sockets.h')
-rw-r--r--src/include/port-sockets.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/port-sockets.h b/src/include/port-sockets.h
index 09e3cfb41..6e8ca47bf 100644
--- a/src/include/port-sockets.h
+++ b/src/include/port-sockets.h
@@ -79,7 +79,16 @@ typedef WSABUF sg_buf;
#include <sys/types.h>
#include <netinet/in.h> /* For struct sockaddr_in and in_addr */
#include <arpa/inet.h> /* For inet_ntoa */
-#include <netdb.h> /* For struct hostent, gethostbyname, etc */
+
+#if !defined(_XOPEN_SOURCE_EXTENDED) && !defined(HAVE_MACSOCK_H) && !defined(_WIN32)
+/* Hack for HPUX, to get h_errno. */
+# define _XOPEN_SOURCE_EXTENDED 1
+# include <netdb.h>
+# undef _XOPEN_SOURCE_EXTENDED
+#else
+# include <netdb.h>
+#endif
+
#include <sys/param.h> /* For MAXHOSTNAMELEN */
#include <sys/socket.h> /* For SOCK_*, AF_*, etc */
#include <sys/time.h> /* For struct timeval */