[OE-core] [PATCH 08/16] ltp: fix build for x32

Christopher Larson kergoth at gmail.com
Thu Jan 5 19:46:20 UTC 2017


From: Christopher Larson <chris_larson at mentor.com>

We need to use the correct time() definition with time_t rather than a long,
since long is 32-bit on x32.

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
 .../ltp/fcntl-fix-the-time-def-to-use-time_t.patch | 28 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20160126.bb          |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch

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 0000000..f7e805a
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
@@ -0,0 +1,28 @@
+From 9590d073d3abe02fe0783ef8c530aef2e873ba9b Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson at mentor.com>
+Date: Tue, 13 Dec 2016 12:48:29 -0700
+Subject: [PATCH] fcntl: fix the time() def to use time_t
+
+This fixes the build on X32, where long is 32-bit rather than 64-bit.
+
+Signed-off-by: Christopher Larson <chris_larson at mentor.com>
+---
+ testcases/kernel/syscalls/fcntl/fcntl14.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c
+index 3b36572..65ac8fa 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl14.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl14.c
+@@ -789,7 +789,7 @@ void dochild(void)
+ 
+ void run_test(int file_flag, int file_mode, int seek, int start, int end)
+ {
+-	extern long time();
++	extern time_t time();
+ 
+ 	/* reset fail to 0 for each run_test call */
+ 	fail = 0;
+-- 
+2.8.0
+
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb b/meta/recipes-extended/ltp/ltp_20160126.bb
index 6e2ceac..72d465b 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 \
            file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
            file://0037-containers-netns_netlink-Avoid-segmentation-fault.patch \
            file://0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch \
+           file://fcntl-fix-the-time-def-to-use-time_t.patch \
            "
 
 S = "${WORKDIR}/git"
-- 
2.8.0




More information about the Openembedded-core mailing list