--- /usr/include/arpa/inet.h-irix Fri Jul 2 17:09:59 1999 +++ /usr/include/arpa/inet.h Mon Sep 6 11:49:02 1999 @@ -56,7 +56,25 @@ extern struct in_addr inet_makeaddr(in_addr_t, in_addr_t); extern in_addr_t inet_netof(struct in_addr); extern in_addr_t inet_network(const char *); -extern char * inet_ntoa(struct in_addr); + +#ifndef __GNUC__ +extern char * inet_ntoa(struct in_addr); +#else +#include +static char *inet_ntoa(struct in_addr in) +{ + unsigned char *bytes; + char *buffer; + + bytes=(unsigned char *)∈ + buffer=strerror(0); + sprintf(buffer, "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], bytes[3]); + return buffer; +} +#endif /* gcc-inet_ntoa-hack, inet_ntoa() should work this way with irix and gcc. * + * WARNING: This uses the strerror()-buffer, so don't get too confused if * + * you see an "Connect from No such dev" or something... * + * -- 990906 cameron. */ #if _SGIAPI extern int inet_aton(const char *, struct in_addr *);