diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2005-01-21 00:58:15 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2005-01-21 00:58:15 +0000 |
commit | 8d99997228972e8283597807bd3d0299f4730910 (patch) | |
tree | a5d54a458dae26038db803ce74c266dbcf7ba3de /net-dialup/ppp/files | |
parent | Version bump. (diff) | |
download | gentoo-2-8d99997228972e8283597807bd3d0299f4730910.tar.gz gentoo-2-8d99997228972e8283597807bd3d0299f4730910.tar.bz2 gentoo-2-8d99997228972e8283597807bd3d0299f4730910.zip |
fixed bug #78679 sys_errlist converted to strerror in the dhcp module, now we can compile/use it also in a uclibc env
Diffstat (limited to 'net-dialup/ppp/files')
-rw-r--r-- | net-dialup/ppp/files/ppp-sys_error_to_strerror.patch | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/net-dialup/ppp/files/ppp-sys_error_to_strerror.patch b/net-dialup/ppp/files/ppp-sys_error_to_strerror.patch new file mode 100644 index 000000000000..12cc7d4508a1 --- /dev/null +++ b/net-dialup/ppp/files/ppp-sys_error_to_strerror.patch @@ -0,0 +1,131 @@ +diff -uNr ppp-2.4.2.old/pppd/plugins/dhcp/dhcpc.c ppp-2.4.2/pppd/plugins/dhcp/dhcpc.c +--- ppp-2.4.2.old/pppd/plugins/dhcp/dhcpc.c 2002-09-30 10:27:08 +0000 ++++ ppp-2.4.2/pppd/plugins/dhcp/dhcpc.c 2005-01-22 03:58:47 +0000 +@@ -144,7 +144,7 @@ + fd = raw_socket(client_config.ifindex); + + if (listen_mode != LISTEN_NONE && fd < 0) { +- fatal("DHCPC: couldn't listen on socket, %s", sys_errlist[errno]); ++ fatal("DHCPC: couldn't listen on socket, %s", strerror(errno)); + } + + } +@@ -208,7 +208,7 @@ + len = get_packet(&packet, fd); + + if (len == -1 && errno != EINTR) { +- dbglog("DHCPC: error on read, %s, reopening socket", sys_errlist[errno]); ++ dbglog("DHCPC: error on read, %s, reopening socket", strerror(errno)); + change_mode(LISTEN_KERNEL); + } + if (len < 0) continue; +@@ -380,7 +380,7 @@ + else len = get_raw_packet(&packet, fd); + + if (len == -1 && errno != EINTR) { +- dbglog("DHCPC: error on read, %s, reopening socket", sys_errlist[errno]); ++ dbglog("DHCPC: error on read, %s, reopening socket", strerror(errno)); + change_mode(listen_mode); /* just close and reopen */ + } + if (len < 0) continue; +@@ -445,7 +445,7 @@ + + } else { + /* An error occured */ +- dbglog("DHCPC: error on select, %s, reopening socket", sys_errlist[errno]); ++ dbglog("DHCPC: error on select, %s, reopening socket", strerror(errno)); + change_mode(listen_mode); /* just close and reopen */ + } + +diff -uNr ppp-2.4.2.old/pppd/plugins/dhcp/packet.c ppp-2.4.2/pppd/plugins/dhcp/packet.c +--- ppp-2.4.2.old/pppd/plugins/dhcp/packet.c 2002-08-27 11:58:49 +0000 ++++ ppp-2.4.2/pppd/plugins/dhcp/packet.c 2005-01-22 03:58:47 +0000 +@@ -125,7 +125,7 @@ + return kernel_packet(payload,payload->giaddr,CLIENT_PORT,dest_ip,dest_port); + + if ((fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { +- DEBUG(LOG_ERR, "socket call failed: %s", sys_errlist[errno]); ++ DEBUG(LOG_ERR, "socket call failed: %s", strerror(errno)); + return -1; + } + +@@ -138,7 +138,7 @@ + dest.sll_halen = 6; + memcpy(dest.sll_addr, dest_arp, 6); + if (bind(fd, (struct sockaddr *)&dest, sizeof(struct sockaddr_ll)) < 0) { +- DEBUG(LOG_ERR, "bind call failed: %s", sys_errlist[errno]); ++ DEBUG(LOG_ERR, "bind call failed: %s", strerror(errno)); + close(fd); + return -1; + } +@@ -161,7 +161,7 @@ + + result = sendto(fd, &packet, sizeof(struct udp_dhcp_packet), 0, (struct sockaddr *) &dest, sizeof(dest)); + if (result <= 0) { +- DEBUG(LOG_ERR, "write on socket failed: %s", sys_errlist[errno]); ++ DEBUG(LOG_ERR, "write on socket failed: %s", strerror(errno)); + } + close(fd); + return result; +diff -uNr ppp-2.4.2.old/pppd/plugins/dhcp/socket.c ppp-2.4.2/pppd/plugins/dhcp/socket.c +--- ppp-2.4.2.old/pppd/plugins/dhcp/socket.c 2002-08-31 11:23:38 +0000 ++++ ppp-2.4.2/pppd/plugins/dhcp/socket.c 2005-01-22 03:58:47 +0000 +@@ -60,7 +60,7 @@ + *addr = sin->sin_addr.s_addr; + DEBUG(LOG_INFO, "%s (our ip) = %s", ifr.ifr_name, inet_ntoa(sin->sin_addr)); + } else { +- LOG(LOG_ERR, "SIOCGIFADDR failed!: %s", sys_errlist[errno]); ++ LOG(LOG_ERR, "SIOCGIFADDR failed!: %s", strerror(errno)); + return -1; + } + } +@@ -69,7 +69,7 @@ + DEBUG(LOG_INFO, "adapter index %d", ifr.ifr_ifindex); + *ifindex = ifr.ifr_ifindex; + } else { +- LOG(LOG_ERR, "SIOCGIFINDEX failed!: %s", sys_errlist[errno]); ++ LOG(LOG_ERR, "SIOCGIFINDEX failed!: %s", strerror(errno)); + return -1; + } + if (ioctl(fd, SIOCGIFHWADDR, &ifr) == 0) { +@@ -77,11 +77,11 @@ + DEBUG(LOG_INFO, "adapter hardware address %02x:%02x:%02x:%02x:%02x:%02x", + arp[0], arp[1], arp[2], arp[3], arp[4], arp[5]); + } else { +- LOG(LOG_ERR, "SIOCGIFHWADDR failed!: %s", sys_errlist[errno]); ++ LOG(LOG_ERR, "SIOCGIFHWADDR failed!: %s", strerror(errno)); + return -1; + } + } else { +- LOG(LOG_ERR, "socket failed!: %s", sys_errlist[errno]); ++ LOG(LOG_ERR, "socket failed!: %s", strerror(errno)); + return -1; + } + close(fd); +@@ -98,7 +98,7 @@ + + DEBUG(LOG_INFO, "Opening listen socket on 0x%08x:%d %s\n", ip, port, inf ? inf : "*"); + if ((fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { +- DEBUG(LOG_ERR, "socket call failed: %s", sys_errlist[errno]); ++ DEBUG(LOG_ERR, "socket call failed: %s", strerror(errno)); + return -1; + } + +@@ -144,7 +144,7 @@ + + DEBUG(LOG_INFO, "Opening raw socket on ifindex %d\n", ifindex); + if ((fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { +- DEBUG(LOG_ERR, "socket call failed: %s", sys_errlist[errno]); ++ DEBUG(LOG_ERR, "socket call failed: %s", strerror(errno)); + return -1; + } + +@@ -152,7 +152,7 @@ + sock.sll_protocol = htons(ETH_P_IP); + sock.sll_ifindex = ifindex; + if (bind(fd, (struct sockaddr *) &sock, sizeof(sock)) < 0) { +- DEBUG(LOG_ERR, "bind call failed: %s", sys_errlist[errno]); ++ DEBUG(LOG_ERR, "bind call failed: %s", strerror(errno)); + close(fd); + return -1; + } |