fix(main/chrony): build with NDK r27 (#21200)

This commit is contained in:
termux-pacman-bot
2024-08-22 04:38:20 +00:00
parent 91b40b2e51
commit b323352c2b
2 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
--- 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;

View File

@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="chrony is an implementation of the Network Time Protocol
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.5"
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://chrony-project.org/releases/chrony-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=19fe1d9f4664d445a69a96c71e8fdb60bcd8df24c73d1386e02287f7366ad422
TERMUX_PKG_AUTO_UPDATE=true