source: patches/inetutils-1.4.2-inet_addr_fix-1.patch@ 6092db0

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 6092db0 was a48d7758, checked in by Justin Knierim <cross-lfs@…>, 18 years ago

Renamed inetutils patch to inet_addr_fix.

  • Property mode set to 100644
File size: 2.6 KB
  • inetutils-1.4.2

    Submitted By: Jim Gifford <jim@linuxfromscratch.org>
    Date: 2006-09-09
    Initial Package Version: 1.4.2
    Upstream Status: Unknown
    Origin: http://linuxfromscratch.org/pipermail/lfs-support/2005-January/025868.html
    Description: Updates to use newer GLIBC standards
    
    diff -Naur inetutils-1.4.2.orig/ftp/ftp.c inetutils-1.4.2/ftp/ftp.c
    old new  
    119119        static char hostnamebuf[80];
    120120
    121121        memset((char *)&hisctladdr, 0, sizeof (hisctladdr));
    122         hisctladdr.sin_addr.s_addr = inet_addr(host);
    123         if (hisctladdr.sin_addr.s_addr != -1) {
     122
     123        if (inet_aton(host, &hisctladdr.sin_addr) != 0) {
    124124                hisctladdr.sin_family = AF_INET;
    125125                (void) strncpy(hostnamebuf, host, sizeof(hostnamebuf));
    126126        } else {
  • libinetutils/iruserok.c

    diff -Naur inetutils-1.4.2.orig/libinetutils/iruserok.c inetutils-1.4.2/libinetutils/iruserok.c
    old new  
    260260  register char **pp;
    261261
    262262  /* Try for raw ip address first. */
    263   if (isdigit (*lhost) && (long)(laddr = inet_addr (lhost)) != -1)
     263  if (isdigit (*lhost) && (laddr = inet_addr (lhost)) != INADDR_NONE)
    264264    return (raddr == laddr);
    265265
    266266  /* Better be a hostname. */
  • telnet/commands.c

    diff -Naur inetutils-1.4.2.orig/telnet/commands.c inetutils-1.4.2/telnet/commands.c
    old new  
    22912291        }
    22922292    } else {
    22932293#endif
    2294         temp = inet_addr(hostp);
    2295         if (temp != (unsigned long) -1) {
    2296             sin.sin_addr.s_addr = temp;
     2294        if(inet_aton(hostp, &sin.sin_addr) != 0) {
    22972295            sin.sin_family = AF_INET;
    22982296
    22992297            if (_hostname)
     
    28972895                if (!c)
    28982896                        cp2 = 0;
    28992897
    2900                 if ((tmp = inet_addr(cp)) != -1) {
    2901                         sin_addr.s_addr = tmp;
     2898                if (inet_aton(cp, &sin_addr.s_addr) != 0) {
    29022899                } else if (host = gethostbyname(cp)) {
    29032900#if     defined(h_addr)
    29042901                        memmove((caddr_t)&sin_addr,
  • inetutils-1.4.2

    diff -Naur inetutils-1.4.2.orig/tftp/main.c inetutils-1.4.2/tftp/main.c
    old new  
    228228                strcpy(hostname, host->h_name);
    229229        } else {
    230230                peeraddr.sin_family = AF_INET;
    231                 peeraddr.sin_addr.s_addr = inet_addr(argv[1]);
    232                 if (peeraddr.sin_addr.s_addr == -1) {
     231                if (inet_aton(argv[1], &peeraddr.sin_addr) == 0) {
    233232                        connected = 0;
    234233                        printf("%s: unknown host\n", argv[1]);
    235234                        return;
Note: See TracBrowser for help on using the repository browser.