bmx6: fix compilation with uClibc-ng 614/head
authorRosen Penev <rosenp@gmail.com>
Sun, 30 Aug 2020 21:08:39 +0000 (14:08 -0700)
committerRosen Penev <rosenp@gmail.com>
Mon, 5 Oct 2020 23:00:40 +0000 (16:00 -0700)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
bmx6/Makefile
bmx6/patches/010-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 );
+