summaryrefslogtreecommitdiffstats
path: root/ext/socket/getaddrinfo.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-14 04:09:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-14 04:09:05 +0000
commit48dc3f0ac72847a20eab4d2532568229ed0cbbc7 (patch)
tree931fc3d39d191eaa0842633e028a1de0ebc1b480 /ext/socket/getaddrinfo.c
parent81d5b6b07d678cbe433a78ac98ba5b80aada14fd (diff)
downloadruby-48dc3f0ac72847a20eab4d2532568229ed0cbbc7.tar.gz
ruby-48dc3f0ac72847a20eab4d2532568229ed0cbbc7.tar.xz
ruby-48dc3f0ac72847a20eab4d2532568229ed0cbbc7.zip
* ext/socket/extconf.rb (gai_strerror): checks if available and if
returns const pointer. * ext/socket/getaddrinfo.c (gai_strerror): defines only if non available. [ruby-core:21328] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/getaddrinfo.c')
-rw-r--r--ext/socket/getaddrinfo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index ef01a607b..53656b4c0 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -39,6 +39,9 @@
*/
#include "ruby/config.h"
+#ifdef RUBY_EXTCONF_H
+#include RUBY_EXTCONF_H
+#endif
#include <sys/types.h>
#ifndef _WIN32
#include <sys/param.h>
@@ -195,8 +198,8 @@ if (pai->ai_flags & AI_CANONNAME) {\
#define ERR(err) { error = (err); goto bad; }
-#ifndef __HAIKU__
-#if defined __UCLIBC__
+#ifndef HAVE_GAI_STRERROR
+#ifdef GAI_STRERROR_CONST
const
#endif
char *