0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-03-03 06:48:20 +00:00
termux-packages/packages/chrony/0001-missing-ethtool_cmd_speed.patch
2024-08-22 12:11:58 +08:00

18 lines
359 B
Diff

--- a/ntp_io_linux.c
+++ b/ntp_io_linux.c
@@ -49,6 +49,14 @@
#include "sys_linux.h"
#include "util.h"
+// missing in NDK linux/ethtool.h
+#if defined(__ANDROID__)
+static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
+{
+ return (ep->speed_hi << 16) | ep->speed;
+}
+#endif
+
struct Interface {
char name[IF_NAMESIZE];
int if_index;