summary refs log tree commit diff
path: root/src/tool
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2007-11-25 18:42:37 +0000
committerFlorian Westphal <fw@strlen.de>2007-11-25 18:42:37 +0000
commit20ce56cc5bdbee652f73499e3b03714ecbb45085 (patch)
treedc651540430e39152a98d4bf56975bc66ac38fb8 /src/tool
parent47a0379e2bef76959d2a0c06ceaea6b80e5d614d (diff)
downloadngircd-20ce56cc5bdbee652f73499e3b03714ecbb45085.tar.gz
ngircd-20ce56cc5bdbee652f73499e3b03714ecbb45085.zip
include <arpa/inet.h> inside tool.h
In file included from hash.c:24:
../tool/tool.h:27: warning: `struct in_addr' declared inside parameter list
Diffstat (limited to 'src/tool')
-rw-r--r--src/tool/tool.c5
-rw-r--r--src/tool/tool.h8
2 files changed, 8 insertions, 5 deletions
diff --git a/src/tool/tool.c b/src/tool/tool.c
index dc238451..52d7be88 100644
--- a/src/tool/tool.c
+++ b/src/tool/tool.c
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: tool.c,v 1.7 2007/11/23 16:26:05 fw Exp $";
+static char UNUSED id[] = "$Id: tool.c,v 1.8 2007/11/25 18:42:38 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -23,9 +23,6 @@ static char UNUSED id[] = "$Id: tool.c,v 1.7 2007/11/23 16:26:05 fw Exp $";
 #include <string.h>
 
 #include <netinet/in.h>
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
 
 #include "exp.h"
 #include "tool.h"
diff --git a/src/tool/tool.h b/src/tool/tool.h
index bdd846f7..7ce3e2c8 100644
--- a/src/tool/tool.h
+++ b/src/tool/tool.h
@@ -8,7 +8,7 @@
  * (at your option) any later version.
  * Please read the file COPYING, README and AUTHORS for more information.
  *
- * $Id: tool.h,v 1.4 2007/11/23 16:26:05 fw Exp $
+ * $Id: tool.h,v 1.5 2007/11/25 18:42:38 fw Exp $
  *
  * Tool functions (Header)
  */
@@ -18,6 +18,12 @@
 #define __tool_h__
 #include "portab.h"
 
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#else
+# define PF_INET AF_INET
+#endif
+
 GLOBAL void ngt_TrimLastChr PARAMS((char *String, const char Chr ));
 
 GLOBAL void ngt_TrimStr PARAMS((char *String ));