mac80211 ozonet updates
[openwrt/.git] / package / utils / util-linux / patches / 200-musl-1.2.x.patch
1 From 69e4fbfbfd9c42af508954d9fb985c5c7b657784 Mon Sep 17 00:00:00 2001
2 From: Karel Zak <kzak@redhat.com>
3 Date: Tue, 11 Aug 2020 11:02:31 +0200
4 Subject: [PATCH] hwclock: add fallback if SYS_settimeofday does not exist
5
6 It seems Musl-C removes SYS_settimeofday macro at all.
7
8 Addresses: https://github.com/karelzak/util-linux/commit/9c6139a72017cecb9145e46102152cb4f456ada6#commitcomment-41290951
9 Signed-off-by: Karel Zak <kzak@redhat.com>
10 ---
11  sys-utils/hwclock.c | 4 ++++
12  1 file changed, 4 insertions(+)
13
14 --- a/sys-utils/hwclock.c
15 +++ b/sys-utils/hwclock.c
16 @@ -675,6 +675,10 @@ display_time(struct timeval hwctime)
17   */
18  #define __set_time(_tv)                settimeofday(_tv, NULL)
19  
20 +#if !defined(SYS_settimeofday) && defined(__NR_settimeofday)
21 +# define SYS_settimeofday      __NR_settimeofday
22 +#endif
23 +
24  static inline int __set_timezone(const struct timezone *tz)
25  {
26  #ifdef SYS_settimeofday