summaryrefslogtreecommitdiff
path: root/ares_setup.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-01-19 20:20:56 +0100
committerYang Tse <yangsita@gmail.com>2012-01-19 20:20:56 +0100
commit4ab65461b6aefd0654a5b586bc6ee57976f3fba3 (patch)
treeb566773d0190ee88302227cb96e01db18854a2bc /ares_setup.h
parentf1a1df1e6c4fed8dc5816f6e09a0cfeed64bb71f (diff)
downloadc-ares-4ab65461b6aefd0654a5b586bc6ee57976f3fba3.tar.gz
c-ares-4ab65461b6aefd0654a5b586bc6ee57976f3fba3.tar.bz2
c-ares-4ab65461b6aefd0654a5b586bc6ee57976f3fba3.zip
ares_init.c: fix compiler warning on winsock builds
Diffstat (limited to 'ares_setup.h')
-rw-r--r--ares_setup.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/ares_setup.h b/ares_setup.h
index a46c510..1ef054d 100644
--- a/ares_setup.h
+++ b/ares_setup.h
@@ -2,7 +2,7 @@
#define HEADER_CARES_SETUP_H
-/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al
+/* Copyright (C) 2004 - 2012 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
@@ -157,6 +157,18 @@
#endif /* HAVE_CONFIG_H */
+/*
+ * Arg 2 type for gethostname in case it hasn't been defined in config file.
+ */
+
+#ifndef GETHOSTNAME_TYPE_ARG2
+# ifdef USE_WINSOCK
+# define GETHOSTNAME_TYPE_ARG2 int
+# else
+# define GETHOSTNAME_TYPE_ARG2 size_t
+# endif
+#endif
+
#ifdef __POCC__
# include <sys/types.h>
# include <unistd.h>