diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-01 02:32:21 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-01 02:32:21 +0000 |
commit | 796cf91116e33b7e39238d8e3025786fee710452 (patch) | |
tree | b7dc008d6846f3dba3c99b6d240d608e0c85ee4e | |
parent | 0f80f6665bfde32958f7e72d196e5c1561826cc1 (diff) | |
download | ruby-796cf91116e33b7e39238d8e3025786fee710452.tar.gz ruby-796cf91116e33b7e39238d8e3025786fee710452.tar.xz ruby-796cf91116e33b7e39238d8e3025786fee710452.zip |
* ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): add const
qualifier only for uClibc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/socket/addrinfo.h | 5 | ||||
-rw-r--r-- | ext/socket/getaddrinfo.c | 5 |
3 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Fri Mar 1 11:29:10 2002 WATANABE Hirofumi <eban@ruby-lang.org> + + * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): add const + qualifier only for uClibc. + Fri Mar 1 11:22:51 2002 Amos Gouaux <amos+ruby@utdallas.edu> * lib/net/imap.rb: added document. diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h index aaa309cfd..bd3de72e1 100644 --- a/ext/socket/addrinfo.h +++ b/ext/socket/addrinfo.h @@ -154,7 +154,10 @@ extern int getnameinfo __P(( extern void freehostent __P((struct hostent *)); extern void freeaddrent __P((struct addrinfo *)); -extern const char *gai_strerror __P((int)); +#if defined __UCLIBC__ +const +#endif +extern char *gai_strerror __P((int)); /* In case there is no definition of offsetof() provided - though any proper Standard C system should have one. */ diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index 863d31ea6..fa060ad17 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -191,7 +191,10 @@ if (pai->ai_flags & AI_CANONNAME) {\ #define ERR(err) { error = (err); goto bad; } -const char * +#if defined __UCLIBC__ +const +#endif +char * gai_strerror(ecode) int ecode; { |