Merge pull request #612 from neheb/ool
authorMoritz Warning <moritzwarning@web.de>
Tue, 6 Oct 2020 17:09:22 +0000 (19:09 +0200)
committerGitHub <noreply@github.com>
Tue, 6 Oct 2020 17:09:22 +0000 (19:09 +0200)
oonf-olsrd2: fix static problems

bmx6/Makefile
bmx6/patches/010-siocgstamp.patch [new file with mode: 0644]
bmx7/Makefile
bmx7/patches/020-siocgstamp.patch [new file with mode: 0644]

index 027098daadf50b4b21fc2faa37de0feb077e61fa..2b0dd4c5d294b4afb93c77fcd1cf2f26d2a96a26 100644 (file)
@@ -33,7 +33,7 @@ PKG_SOURCE_URL:=https://github.com/bmx-routing/bmx6.git
 PKG_REV:=d8869ec69797be0ca2da06abb344e60198a8a275
 PKG_MIRROR_HASH:=4aae08158666f5976c952e195b3a1369a5f7bba26fedd5d5ea33b35956e24ec6
 PKG_VERSION:=r2018051214
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
 PKG_SOURCE_VERSION:=$(PKG_REV)
diff --git a/bmx6/patches/010-siocgstamp.patch b/bmx6/patches/010-siocgstamp.patch
new file mode 100644 (file)
index 0000000..10c2582
--- /dev/null
@@ -0,0 +1,40 @@
+--- a/schedule.c
++++ b/schedule.c
+@@ -356,7 +356,9 @@ loop4Event:
+                                       continue;
+                               }
++#ifdef SIOCGSTAMP
+                               ioctl(pb.i.iif->rx_mcast_sock, SIOCGSTAMP, &(pb.i.tv_stamp)) ;
++#endif
+                               
+                               rx_packet( &pb );
+                               
+@@ -381,8 +383,10 @@ loop4Event:
+                                       
+                                       continue;
+                               }
+-                              
++
++#ifdef SIOCGSTAMP
+                               ioctl(pb.i.iif->rx_fullbrc_sock, SIOCGSTAMP, &(pb.i.tv_stamp)) ;
++#endif
+                               
+                               rx_packet( &pb );
+                               
+@@ -432,10 +436,15 @@ loop4Event:
+                                       }
+                               }
+ #endif
++#ifdef SIOCGSTAMP
+                               if ( tv_stamp == NULL )
+                                       ioctl( pb.i.iif->unicast_sock, SIOCGSTAMP, &(pb.i.tv_stamp) );
+                               else
+                                       timercpy( tv_stamp, &(pb.i.tv_stamp) );
++#else
++                              if (tv_stamp)
++                                      timercpy( tv_stamp, &(pb.i.tv_stamp) );
++#endif
+                               
+                               rx_packet( &pb );
+                               
index 6e71222457370c5cf7000c356cf58f371d7deeda..5ec7b03a3877f88438b3c309e73617f0c82eb6ba 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bmx7
 PKG_VERSION:=7.1.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/bmx-routing/bmx7/tar.gz/v$(PKG_VERSION)?
diff --git a/bmx7/patches/020-siocgstamp.patch b/bmx7/patches/020-siocgstamp.patch
new file mode 100644 (file)
index 0000000..977aa49
--- /dev/null
@@ -0,0 +1,38 @@
+--- a/src/schedule.c
++++ b/src/schedule.c
+@@ -375,7 +375,9 @@ loop4Event:
+                                       continue;
+                               }
++#ifdef SIOCGSTAMP
+                               ioctl(pb.i.iif->rx_mcast_sock, SIOCGSTAMP, &(pb.i.tv_stamp));
++#endif
+                               rx_packet(&pb);
+@@ -401,7 +403,9 @@ loop4Event:
+                                       continue;
+                               }
++#ifdef SIOCGSTAMP
+                               ioctl(pb.i.iif->rx_fullbrc_sock, SIOCGSTAMP, &(pb.i.tv_stamp));
++#endif
+                               rx_packet(&pb);
+@@ -451,10 +455,15 @@ loop4Event:
+                                       }
+                               }
+ #endif
++#ifdef SIOCGSTAMP
+                               if (tv_stamp == NULL)
+                                       ioctl(pb.i.iif->unicast_sock, SIOCGSTAMP, &(pb.i.tv_stamp));
+                               else
+                                       timercpy(&(pb.i.tv_stamp), tv_stamp);
++#else
++                              if (tv_stamp)
++                                      timercpy(&(pb.i.tv_stamp), tv_stamp);
++#endif
+                               rx_packet(&pb);