bmx7: fix compilation with uClibc-ng 615/head
authorRosen Penev <rosenp@gmail.com>
Sun, 30 Aug 2020 21:09:17 +0000 (14:09 -0700)
committerRosen Penev <rosenp@gmail.com>
Mon, 5 Oct 2020 23:01:17 +0000 (16:01 -0700)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
bmx7/Makefile
bmx7/patches/020-siocgstamp.patch [new file with mode: 0644]

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);