Merge pull request #614 from neheb/bmx6

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

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

View File

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