eoip: fix compilation with gcc14
authorRosen Penev <rosenp@gmail.com>
Mon, 13 May 2024 22:44:04 +0000 (15:44 -0700)
committerRosen Penev <rosenp@gmail.com>
Tue, 14 May 2024 23:39:10 +0000 (16:39 -0700)
Wrong pointer and missing header.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/eoip/Makefile
net/eoip/patches/010-gcc14.patch [new file with mode: 0644]
net/eoip/patches/100-add_LF_to_pidfile.patch

index ff7c832692ccbf8f8698d16fc148d75ce2f7e8c6..bc9847d1326184b381e20b541c52a10d24626ba2 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=eoip
 PKG_VERSION:=0.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Bogdan Shatik <bogdikxxx@mail.ru>
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/net/eoip/patches/010-gcc14.patch b/net/eoip/patches/010-gcc14.patch
new file mode 100644 (file)
index 0000000..8495a05
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/eoip.c
++++ b/eoip.c
+@@ -44,6 +44,7 @@
+ #include <signal.h>
+ #include <assert.h>
+ #include <pthread.h>
++#include <libgen.h>
+ #include <limits.h>
+ #include <asm/byteorder.h>
+ #include "minIni.h"
+@@ -205,7 +206,7 @@ static void *thr_rx(void *threadid)
+           ret = select(raw_socket+1, &rfds, NULL, NULL, NULL);
+           assert(rxringbufused == 0);
+           while (rxringbufused < MAXRINGBUF) {
+-              rxringpayload[rxringbufused] = recvfrom(raw_socket, rxringbufptr[rxringbufused], MAXPAYLOAD, 0, &saddr[rxringbufused], &saddr_size);
++              rxringpayload[rxringbufused] = recvfrom(raw_socket, rxringbufptr[rxringbufused], MAXPAYLOAD, 0, (struct sockaddr *)&saddr[rxringbufused], &saddr_size);
+               if (rxringpayload[rxringbufused] < 0)
+                   break;
+               if (rxringpayload[rxringbufused] >= 28)
index 66278d46515a10bd2a431e633a9ec5919153206d..08e7a775372002d93f9395fcd40876d69f46ed94 100644 (file)
@@ -1,6 +1,6 @@
 --- a/eoip.c
 +++ b/eoip.c
-@@ -430,7 +430,7 @@ int main(int argc, char **argv)
+@@ -431,7 +431,7 @@ int main(int argc, char **argv)
        exit(1);
  
      mfd = fopen(pidfile, "w");