summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/uclibc/uclibc-git.inc3
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch73
2 files changed, 75 insertions, 1 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc
index 3c8e47cc22..0649acaab5 100644
--- a/meta/recipes-core/uclibc/uclibc-git.inc
+++ b/meta/recipes-core/uclibc/uclibc-git.inc
@@ -1,4 +1,4 @@
1SRCREV="19f21a1d974d802f05c43e4cabd6ed6891a8ae50" 1SRCREV="5eddde8f094ef52dca06695cc598e3b2556dcccb"
2 2
3PV = "0.9.33+git${SRCPV}" 3PV = "0.9.33+git${SRCPV}"
4 4
@@ -24,5 +24,6 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
24 file://0001-Add-eventfd_read-and-eventfd_write.patch \ 24 file://0001-Add-eventfd_read-and-eventfd_write.patch \
25 file://0002-wire-setns-syscall.patch \ 25 file://0002-wire-setns-syscall.patch \
26 file://0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch \ 26 file://0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch \
27 file://0004-Add-clock_adjtime-syscall.patch \
27 " 28 "
28S = "${WORKDIR}/git" 29S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch b/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
new file mode 100644
index 0000000000..3062ae4abc
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
@@ -0,0 +1,73 @@
1From 8e19e651145554fbcb90179f3dfbc7ea8a07c900 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 15 Mar 2014 09:32:20 -0700
4Subject: [PATCH 4/4] Add clock_adjtime syscall
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 include/sys/timex.h | 5 ++++-
9 libc/sysdeps/linux/common/Makefile.in | 2 +-
10 libc/sysdeps/linux/common/clock_adjtime.c | 15 +++++++++++++++
11 3 files changed, 20 insertions(+), 2 deletions(-)
12 create mode 100644 libc/sysdeps/linux/common/clock_adjtime.c
13
14diff --git a/include/sys/timex.h b/include/sys/timex.h
15index 621afce..9082a28 100644
16--- a/include/sys/timex.h
17+++ b/include/sys/timex.h
18@@ -20,6 +20,7 @@
19
20 #include <features.h>
21 #include <sys/time.h>
22+#include <time.h>
23
24 /* These definitions from linux/timex.h as of 2.2.0. */
25
26@@ -125,7 +126,9 @@ libc_hidden_proto(adjtimex)
27 extern int ntp_gettime (struct ntptimeval *__ntv) __THROW;
28 extern int ntp_adjtime (struct timex *__tntx) __THROW;
29 #endif
30-
31+#if defined __UCLIBC_HAS_REALTIME__
32+extern int clock_adjtime (clockid_t __clock_id, struct timex *__ntx) __THROW;
33+#endif
34 __END_DECLS
35
36 #endif /* sys/timex.h */
37diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
38index 10d9884..bb985b6 100644
39--- a/libc/sysdeps/linux/common/Makefile.in
40+++ b/libc/sysdeps/linux/common/Makefile.in
41@@ -84,7 +84,7 @@ CSRC-$(ARCH_USE_MMU) += msync.c
42 CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
43 CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
44 # aio_cancel|aio_error|aio_fsync|aio_read|aio_return|aio_suspend|aio_write|clock_getres|clock_gettime|clock_settime|clock_settime|fdatasync|lio_listio|mlockall|munlockall|mlock|munlock|mq_close|mq_getattr|mq_notify|mq_open|mq_receive|mq_timedreceive|mq_send|mq_timedsend|mq_setattr|mq_unlink|nanosleep|sched_getparam|sched_get_priority_max|sched_get_priority_min|sched_getscheduler|sched_rr_get_interval|sched_setparam|sched_setscheduler|sem_close|sem_destroy|sem_getvalue|sem_init|sem_open|sem_post|sem_trywait|sem_wait|sem_unlink|sem_wait|shm_open|shm_unlink|sigqueue|sigtimedwait|sigwaitinfo|timer_create|timer_delete|timer_getoverrun|timer_gettime|timer_settime
45-CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
46+CSRC-$(UCLIBC_HAS_REALTIME) += clock_adjtime.c clock_getres.c clock_gettime.c clock_settime.c \
47 fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
48 nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
49 sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
50diff --git a/libc/sysdeps/linux/common/clock_adjtime.c b/libc/sysdeps/linux/common/clock_adjtime.c
51new file mode 100644
52index 0000000..968ec27
53--- /dev/null
54+++ b/libc/sysdeps/linux/common/clock_adjtime.c
55@@ -0,0 +1,15 @@
56+/*
57+ * clock_adjtime() for uClibc
58+ *
59+ * Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
60+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
61+ *
62+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
63+ */
64+
65+#include <sys/syscall.h>
66+#include <sys/timex.h>
67+
68+#ifdef __NR_clock_adjtime
69+_syscall2(int, clock_adjtime, clockid_t, clock_id, struct timex*, ntx)
70+#endif
71--
721.9.0
73