diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 15:38:42 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 15:38:42 +0000 |
| commit | 72f25c648fb329577865b1d34a6801c14abe94c8 (patch) | |
| tree | a4cebd7cb5c86f78de81525c8946ca16752158e6 /ext/socket/getaddrinfo.c | |
| parent | b3ed32f91ccc6e1d6dae06da0666ed9237248c99 (diff) | |
merges r21505 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/getaddrinfo.c')
| -rw-r--r-- | ext/socket/getaddrinfo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index de16b9fb1..5ce935f58 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 * |
