Include sys/socket.h, arpa/inet.h
[yaz-moved-to-github.git] / src / tcpdchk.c
index a2d1f4d..d3edb22 100644 (file)
@@ -1,8 +1,6 @@
-/*
- * Copyright (C) 1995-2005, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
  * See the file LICENSE for details.
- *
- * $Id: tcpdchk.c,v 1.8 2005-06-25 15:46:06 adam Exp $
  */
 /**
  * \file tcpdchk.c
 #include <stdio.h>
 #include <string.h>
 
+#ifdef WIN32
+#include <winsock.h>
+#endif
+
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
 
-#ifdef WIN32
-#include <winsock.h>
-#else
+#if HAVE_NETINET_IN_H
 #include <netinet/in.h>
-#include <netdb.h>
+#endif
+
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
-#include <netinet/tcp.h>
 #endif
 
 #if HAVE_SYS_SOCKET_H
+/* freebsd wants this for AF_INET */
 #include <sys/socket.h>
 #endif
 
-#include <yaz/yconfig.h>
+#if HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
 #include <yaz/comstack.h>
 #include <yaz/statserv.h>
 #include <yaz/log.h>