diff options
Diffstat (limited to 'net-dialup/ppp/files/ppp-2.5.0-dhcp/0001-Convert-sys_errlist-to-strerror.patch')
-rw-r--r-- | net-dialup/ppp/files/ppp-2.5.0-dhcp/0001-Convert-sys_errlist-to-strerror.patch | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/net-dialup/ppp/files/ppp-2.5.0-dhcp/0001-Convert-sys_errlist-to-strerror.patch b/net-dialup/ppp/files/ppp-2.5.0-dhcp/0001-Convert-sys_errlist-to-strerror.patch deleted file mode 100644 index 193e90b78a9a..000000000000 --- a/net-dialup/ppp/files/ppp-2.5.0-dhcp/0001-Convert-sys_errlist-to-strerror.patch +++ /dev/null @@ -1,148 +0,0 @@ -From e21d256cded13a625bc28d3fe812141a202be696 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert <floppym@gentoo.org> -Date: Thu, 13 Apr 2023 14:59:35 -0400 -Subject: [PATCH 1/3] Convert sys_errlist to strerror - ---- - dhcpc.c | 8 ++++---- - packet.c | 6 +++--- - socket.c | 14 +++++++------- - 3 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/dhcpc.c b/dhcpc.c -index fcff8b9..ff83b53 100644 ---- a/dhcpc.c -+++ b/dhcpc.c -@@ -144,7 +144,7 @@ void change_mode(int new_mode) - 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 @@ void dhcp_rx(void *dummy) { - 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 @@ void dhcp_request_new() { - 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 @@ void dhcp_request_new() { - - } 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 --git a/packet.c b/packet.c -index 00b5202..07a1aac 100644 ---- a/packet.c -+++ b/packet.c -@@ -125,7 +125,7 @@ int raw_packet(struct dhcpMessage *payload, u_int32_t source_ip, int source_port - 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 @@ int raw_packet(struct dhcpMessage *payload, u_int32_t source_ip, int source_port - 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 @@ int raw_packet(struct dhcpMessage *payload, u_int32_t source_ip, int source_port - - 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 --git a/socket.c b/socket.c -index 0234350..a6799d5 100644 ---- a/socket.c -+++ b/socket.c -@@ -60,7 +60,7 @@ int read_interface(char *interface, int *ifindex, u_int32_t *addr, unsigned char - *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 @@ int read_interface(char *interface, int *ifindex, u_int32_t *addr, unsigned char - 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 @@ int read_interface(char *interface, int *ifindex, u_int32_t *addr, unsigned char - 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 @@ int listen_socket(unsigned int ip, int port, char *inf) - - 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 @@ int raw_socket(int ifindex) - - 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 @@ int raw_socket(int ifindex) - 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; - } --- -2.40.0 - |