diff options
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch')
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch index 15fbbe954f..200b2602cb 100644 --- a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch +++ b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5d411fd147d652e9d7bb259f4048693c6e4742aa Mon Sep 17 00:00:00 2001 | 1 | From 3a51ed107f67732910dec12279a9279e158afbe7 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 9 Mar 2020 16:30:19 -0700 | 3 | Date: Mon, 9 Mar 2020 16:30:19 -0700 |
4 | Subject: [PATCH] memcheck/tests: Fix timerfd syscall test | 4 | Subject: [PATCH] memcheck/tests: Fix timerfd syscall test |
@@ -10,14 +10,16 @@ have the implementation or syscall is not defined | |||
10 | Upstream-Status: Submitted [https://sourceforge.net/p/valgrind/mailman/message/36943897/] | 10 | Upstream-Status: Submitted [https://sourceforge.net/p/valgrind/mailman/message/36943897/] |
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | --- | 12 | --- |
13 | config.h.in | 9 +++++++++ | 13 | config.h.in | 3 +++ |
14 | configure.ac | 3 +++ | 14 | configure.ac | 1 + |
15 | memcheck/tests/linux/timerfd-syscall.c | 10 ++++++++-- | 15 | memcheck/tests/linux/timerfd-syscall.c | 14 +++++++++++--- |
16 | 5 files changed, 32 insertions(+), 2 deletions(-) | 16 | 3 files changed, 15 insertions(+), 3 deletions(-) |
17 | 17 | ||
18 | diff --git a/config.h.in b/config.h.in | ||
19 | index 00db1a6..23fd77a 100644 | ||
18 | --- a/config.h.in | 20 | --- a/config.h.in |
19 | +++ b/config.h.in | 21 | +++ b/config.h.in |
20 | @@ -301,6 +301,9 @@ | 22 | @@ -409,6 +409,9 @@ |
21 | /* Define to 1 if you have the <sys/sysnvl.h> header file. */ | 23 | /* Define to 1 if you have the <sys/sysnvl.h> header file. */ |
22 | #undef HAVE_SYS_SYSNVL_H | 24 | #undef HAVE_SYS_SYSNVL_H |
23 | 25 | ||
@@ -27,9 +29,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
27 | /* Define to 1 if you have the <sys/time.h> header file. */ | 29 | /* Define to 1 if you have the <sys/time.h> header file. */ |
28 | #undef HAVE_SYS_TIME_H | 30 | #undef HAVE_SYS_TIME_H |
29 | 31 | ||
32 | diff --git a/configure.ac b/configure.ac | ||
33 | index b42fdd4..ec95146 100755 | ||
30 | --- a/configure.ac | 34 | --- a/configure.ac |
31 | +++ b/configure.ac | 35 | +++ b/configure.ac |
32 | @@ -4098,6 +4098,7 @@ AC_CHECK_HEADERS([ \ | 36 | @@ -4892,6 +4892,7 @@ AC_CHECK_HEADERS([ \ |
33 | sys/syscall.h \ | 37 | sys/syscall.h \ |
34 | sys/sysnvl.h \ | 38 | sys/sysnvl.h \ |
35 | sys/time.h \ | 39 | sys/time.h \ |
@@ -37,9 +41,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
37 | sys/types.h \ | 41 | sys/types.h \ |
38 | ]) | 42 | ]) |
39 | 43 | ||
44 | diff --git a/memcheck/tests/linux/timerfd-syscall.c b/memcheck/tests/linux/timerfd-syscall.c | ||
45 | index 61d75b5..1ba888a 100644 | ||
40 | --- a/memcheck/tests/linux/timerfd-syscall.c | 46 | --- a/memcheck/tests/linux/timerfd-syscall.c |
41 | +++ b/memcheck/tests/linux/timerfd-syscall.c | 47 | +++ b/memcheck/tests/linux/timerfd-syscall.c |
42 | @@ -45,6 +45,9 @@ | 48 | @@ -42,6 +42,9 @@ |
43 | #if defined(HAVE_SYS_TIME_H) | 49 | #if defined(HAVE_SYS_TIME_H) |
44 | #include <sys/time.h> | 50 | #include <sys/time.h> |
45 | #endif | 51 | #endif |
@@ -49,7 +55,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
49 | #if defined(HAVE_SYS_TYPES_H) | 55 | #if defined(HAVE_SYS_TYPES_H) |
50 | #include <sys/types.h> | 56 | #include <sys/types.h> |
51 | #endif | 57 | #endif |
52 | @@ -54,7 +57,8 @@ | 58 | @@ -51,7 +54,8 @@ |
53 | * timerfd_* system call numbers introduced in 2.6.23. These constants are | 59 | * timerfd_* system call numbers introduced in 2.6.23. These constants are |
54 | * not yet in the glibc 2.7 headers, that is why they are defined here. | 60 | * not yet in the glibc 2.7 headers, that is why they are defined here. |
55 | */ | 61 | */ |
@@ -59,7 +65,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
59 | #if defined(__x86_64__) | 65 | #if defined(__x86_64__) |
60 | #define __NR_timerfd_create 283 | 66 | #define __NR_timerfd_create 283 |
61 | #elif defined(__i386__) | 67 | #elif defined(__i386__) |
62 | @@ -67,8 +71,10 @@ | 68 | @@ -64,8 +68,10 @@ |
63 | #error Cannot detect your architecture! | 69 | #error Cannot detect your architecture! |
64 | #endif | 70 | #endif |
65 | #endif | 71 | #endif |
@@ -71,7 +77,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
71 | #if defined(__x86_64__) | 77 | #if defined(__x86_64__) |
72 | #define __NR_timerfd_settime 286 | 78 | #define __NR_timerfd_settime 286 |
73 | #define __NR_timerfd_gettime 287 | 79 | #define __NR_timerfd_gettime 287 |
74 | @@ -85,7 +91,7 @@ | 80 | @@ -82,7 +88,7 @@ |
75 | #error Cannot detect your architecture! | 81 | #error Cannot detect your architecture! |
76 | #endif | 82 | #endif |
77 | #endif | 83 | #endif |
@@ -80,7 +86,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
80 | 86 | ||
81 | 87 | ||
82 | /* Definitions from include/linux/timerfd.h */ | 88 | /* Definitions from include/linux/timerfd.h */ |
83 | @@ -127,6 +133,7 @@ void set_timespec(struct timespec *tmr, | 89 | @@ -124,6 +130,7 @@ void set_timespec(struct timespec *tmr, unsigned long long ustime) |
84 | tmr->tv_nsec = (long) (1000ULL * (ustime % 1000000ULL)); | 90 | tmr->tv_nsec = (long) (1000ULL * (ustime % 1000000ULL)); |
85 | } | 91 | } |
86 | 92 | ||
@@ -88,7 +94,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
88 | int timerfd_create(int clockid, int flags) | 94 | int timerfd_create(int clockid, int flags) |
89 | { | 95 | { |
90 | return syscall(__NR_timerfd_create, clockid, flags); | 96 | return syscall(__NR_timerfd_create, clockid, flags); |
91 | @@ -142,6 +149,7 @@ int timerfd_gettime(int ufc, struct itim | 97 | @@ -139,6 +146,7 @@ int timerfd_gettime(int ufc, struct itimerspec *otmr) |
92 | { | 98 | { |
93 | return syscall(__NR_timerfd_gettime, ufc, otmr); | 99 | return syscall(__NR_timerfd_gettime, ufc, otmr); |
94 | } | 100 | } |