Changeset 1991

Show
Ignore:
Timestamp:
10/08/98 09:23:27 (16 years ago)
Author:
ucaccsp
Message:

Fix for solaris 2.6 which doesn't have inet_aton()

Location:
rat/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/config_unix.h

    r1988 r1991  
    125125 
    126126#ifdef Solaris 
     127#define NEED_INET_ATON 
    127128#include <sys/stat.h> 
    128129#include <fcntl.h> 
  • rat/trunk/net_udp.c

    r1989 r1991  
    6363}; 
    6464 
     65/*****************************************************************************/ 
     66/* Support functions...                                                      */ 
     67/*****************************************************************************/ 
     68 
    6569static void 
    6670socket_error(char *msg) 
     
    7478        abort(); 
    7579} 
     80 
     81#ifdef NEED_INET_ATON 
     82static int inet_aton(const char *name, struct in_addr *addr) 
     83{ 
     84        addr->s_addr = inet_addr(name); 
     85        return addr->s_addr == (in_addr_t) -1; 
     86} 
     87#endif 
    7688 
    7789/*****************************************************************************/