summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pptp
diff options
context:
space:
mode:
authorSergey V. Lobanov <sergey@lobanov.in>2024-08-27 21:44:29 +0000
committerSergey V. Lobanov <sergey@lobanov.in>2024-08-27 22:41:58 +0000
commit966c2bc8df039c67f4711ba9bb3f267fbd405c8d (patch)
treecb2a1ac681b770d0b158922db4d8144055f9c48c /accel-pppd/ctrl/pptp
parent2d38a77c008524e293e0dc4b1e46c9093e7a9457 (diff)
downloadaccel-ppp-966c2bc8df039c67f4711ba9bb3f267fbd405c8d.tar.gz
accel-ppp-966c2bc8df039c67f4711ba9bb3f267fbd405c8d.zip
build: fix compile errors on GCC 14
This patch fixes compile errors on GCC 14 like the following /root/accel-ppp/accel-pppd/radius/packet.c: In function 'rad_packet_recv': /root/accel-ppp/accel-pppd/radius/packet.c:142:72: error: passing argument 5 of 'recvfrom' from incompatible pointer type [-Wincompatible-pointer-types] 142 | n = recvfrom(fd, pack->buf, REQ_LENGTH_MAX, 0, addr, &addr_len); | ^~~~ | | | struct sockaddr_in * In file included from /usr/include/netinet/in.h:10, from /usr/include/arpa/inet.h:9, from /root/accel-ppp/accel-pppd/radius/packet.c:10: /usr/include/sys/socket.h:397:55: note: expected 'struct sockaddr * restrict' but argument is of type 'struct sockaddr_in *' Reference: https://gcc.gnu.org/gcc-14/porting_to.html
Diffstat (limited to 'accel-pppd/ctrl/pptp')
-rw-r--r--accel-pppd/ctrl/pptp/pptp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c
index a95fe8ae..cc5720f7 100644
--- a/accel-pppd/ctrl/pptp/pptp.c
+++ b/accel-pppd/ctrl/pptp/pptp.c
@@ -708,7 +708,7 @@ static int pptp_connect(struct triton_md_handler_t *h)
conn->ctrl.calling_station_id = _malloc(17);
conn->ctrl.called_station_id = _malloc(17);
u_inet_ntoa(addr.sin_addr.s_addr, conn->ctrl.calling_station_id);
- getsockname(sock, &addr, &size);
+ getsockname(sock, (struct sockaddr*)&addr, &size);
u_inet_ntoa(addr.sin_addr.s_addr, conn->ctrl.called_station_id);
ppp_init(&conn->ppp);