diff --git a/ChangeLog b/ChangeLog index 4126a07e00..885f847f0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 1 11:29:10 2002 WATANABE Hirofumi + + * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): add const + qualifier only for uClibc. + Fri Mar 1 11:22:51 2002 Amos Gouaux * lib/net/imap.rb: added document. diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h index aaa309cfdd..bd3de72e10 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 863d31ea6e..fa060ad171 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; {