summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-12-13 20:02:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-09 13:39:12 +0000
commit0bfe26381640c2fc1b2e5ed6db23a04a0608f538 (patch)
tree9f1952d388c92b3b0fdcb702107365c8cf648801
parent629b96f142f55749ed9e00c3b4d4de3e4c7fa035 (diff)
downloadpoky-0bfe26381640c2fc1b2e5ed6db23a04a0608f538.tar.gz
ltp: fix build for x32
We need to use the correct time() definition with time_t rather than a long, since long is 32-bit on x32. (From OE-Core rev: 520cee660efa60e44dbf004a617c130597be6cae) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch28
-rw-r--r--meta/recipes-extended/ltp/ltp_20160126.bb1
2 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch b/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
new file mode 100644
index 0000000000..f7e805a954
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
@@ -0,0 +1,28 @@
1From 9590d073d3abe02fe0783ef8c530aef2e873ba9b Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Tue, 13 Dec 2016 12:48:29 -0700
4Subject: [PATCH] fcntl: fix the time() def to use time_t
5
6This fixes the build on X32, where long is 32-bit rather than 64-bit.
7
8Signed-off-by: Christopher Larson <chris_larson@mentor.com>
9---
10 testcases/kernel/syscalls/fcntl/fcntl14.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c
14index 3b36572..65ac8fa 100644
15--- a/testcases/kernel/syscalls/fcntl/fcntl14.c
16+++ b/testcases/kernel/syscalls/fcntl/fcntl14.c
17@@ -789,7 +789,7 @@ void dochild(void)
18
19 void run_test(int file_flag, int file_mode, int seek, int start, int end)
20 {
21- extern long time();
22+ extern time_t time();
23
24 /* reset fail to 0 for each run_test call */
25 fail = 0;
26--
272.8.0
28
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb b/meta/recipes-extended/ltp/ltp_20160126.bb
index 6e2ceac0e2..72d465bed3 100644
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -65,6 +65,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
65 file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ 65 file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
66 file://0037-containers-netns_netlink-Avoid-segmentation-fault.patch \ 66 file://0037-containers-netns_netlink-Avoid-segmentation-fault.patch \
67 file://0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch \ 67 file://0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch \
68 file://fcntl-fix-the-time-def-to-use-time_t.patch \
68 " 69 "
69 70
70S = "${WORKDIR}/git" 71S = "${WORKDIR}/git"