summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch')
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch75
1 files changed, 0 insertions, 75 deletions
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
deleted file mode 100644
index c596db67b1..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1Upstream-Status: Pending
2
3From 8e19e651145554fbcb90179f3dfbc7ea8a07c900 Mon Sep 17 00:00:00 2001
4From: Khem Raj <raj.khem@gmail.com>
5Date: Sat, 15 Mar 2014 09:32:20 -0700
6Subject: [PATCH 4/4] Add clock_adjtime syscall
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 include/sys/timex.h | 5 ++++-
11 libc/sysdeps/linux/common/Makefile.in | 2 +-
12 libc/sysdeps/linux/common/clock_adjtime.c | 15 +++++++++++++++
13 3 files changed, 20 insertions(+), 2 deletions(-)
14 create mode 100644 libc/sysdeps/linux/common/clock_adjtime.c
15
16diff --git a/include/sys/timex.h b/include/sys/timex.h
17index 621afce..9082a28 100644
18--- a/include/sys/timex.h
19+++ b/include/sys/timex.h
20@@ -20,6 +20,7 @@
21
22 #include <features.h>
23 #include <sys/time.h>
24+#include <time.h>
25
26 /* These definitions from linux/timex.h as of 2.2.0. */
27
28@@ -125,7 +126,9 @@ libc_hidden_proto(adjtimex)
29 extern int ntp_gettime (struct ntptimeval *__ntv) __THROW;
30 extern int ntp_adjtime (struct timex *__tntx) __THROW;
31 #endif
32-
33+#if defined __UCLIBC_HAS_REALTIME__
34+extern int clock_adjtime (clockid_t __clock_id, struct timex *__ntx) __THROW;
35+#endif
36 __END_DECLS
37
38 #endif /* sys/timex.h */
39diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
40index 10d9884..bb985b6 100644
41--- a/libc/sysdeps/linux/common/Makefile.in
42+++ b/libc/sysdeps/linux/common/Makefile.in
43@@ -84,7 +84,7 @@ CSRC-$(ARCH_USE_MMU) += msync.c
44 CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
45 CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
46 # 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
47-CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
48+CSRC-$(UCLIBC_HAS_REALTIME) += clock_adjtime.c clock_getres.c clock_gettime.c clock_settime.c \
49 fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
50 nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
51 sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
52diff --git a/libc/sysdeps/linux/common/clock_adjtime.c b/libc/sysdeps/linux/common/clock_adjtime.c
53new file mode 100644
54index 0000000..968ec27
55--- /dev/null
56+++ b/libc/sysdeps/linux/common/clock_adjtime.c
57@@ -0,0 +1,15 @@
58+/*
59+ * clock_adjtime() for uClibc
60+ *
61+ * Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
62+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
63+ *
64+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
65+ */
66+
67+#include <sys/syscall.h>
68+#include <sys/timex.h>
69+
70+#ifdef __NR_clock_adjtime
71+_syscall2(int, clock_adjtime, clockid_t, clock_id, struct timex*, ntx)
72+#endif
73--
741.9.0
75