Merge pull request #615 from neheb/bmx7

bmx7: fix compilation with uClibc-ng
This commit is contained in:
Moritz Warning 2020-10-06 18:53:03 +02:00 committed by GitHub
commit e15d793a49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 1 deletions

View 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)?

View File

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