From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH 10/10] ltp: Fix build with GCC-14
Date: Mon, 6 May 2024 18:14:55 -0700 [thread overview]
Message-ID: <20240507011455.313230-10-raj.khem@gmail.com> (raw)
In-Reply-To: <20240507011455.313230-1-raj.khem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...-Use-time_t-instead-of-long-for-type.patch | 54 +++++++++++++++++++
meta/recipes-extended/ltp/ltp_20240129.bb | 1 +
2 files changed, 55 insertions(+)
create mode 100644 meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch
diff --git a/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch b/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch
new file mode 100644
index 00000000000..84194c1b739
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-sched_stress-Use-time_t-instead-of-long-for-type.patch
@@ -0,0 +1,54 @@
+From 74074f9a71c876d6e95c2d72702888dd2fabc761 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 May 2024 11:43:20 -0700
+Subject: [PATCH] sched_stress: Use time_t instead of long for type
+
+This ensures it works across different architectures
+Fixes
+
+| sched_driver.c:744:43: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types]
+| 744 | printf("\nend time = %s\n", ctime(&end_time));
+| | ^~~~~~~~~
+
+With gcc-14
+
+Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2024-May/038243.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/sched/sched_stress/sched_driver.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/kernel/sched/sched_stress/sched_driver.c b/testcases/kernel/sched/sched_stress/sched_driver.c
+index 61573d788..5b8c187fe 100644
+--- a/testcases/kernel/sched/sched_stress/sched_driver.c
++++ b/testcases/kernel/sched/sched_stress/sched_driver.c
+@@ -136,7 +136,7 @@ int debug = 0;
+ /*
+ * Function prototypes
+ */
+-void startup(long);
++void startup(time_t);
+ int start_testcase(char *, char *, char *, char *, char *, char *);
+ int process_slots_in_use();
+ int available_user_process_slots();
+@@ -251,7 +251,7 @@ int main(int argc, char **argv)
+ * information to the screen and . It also initializes the *
+ * process id list and other global variables. *
+ *-----------------------------------------------------------------------*/
+-void startup(long start_time)
++void startup(time_t start_time)
+ {
+ char tempbuffer[50]; /* temporary buffer to hold names */
+
+@@ -734,7 +734,7 @@ void kill_short_term_testcases()
+ void finishup(start_time)
+ long start_time; /* starting time to calculate elapsed time */
+ {
+- long end_time; /* time when program finished */
++ time_t end_time; /* time when program finished */
+
+ /*
+ * Get the end time and calculate elapsed time; write all this out
+--
+2.45.0
+
diff --git a/meta/recipes-extended/ltp/ltp_20240129.bb b/meta/recipes-extended/ltp/ltp_20240129.bb
index e88e931a687..f8e6d3987ee 100644
--- a/meta/recipes-extended/ltp/ltp_20240129.bb
+++ b/meta/recipes-extended/ltp/ltp_20240129.bb
@@ -29,6 +29,7 @@ SRCREV = "68737d20556d37364c95776044b1119c0912a36a"
SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \
file://0001-Remove-OOM-tests-from-runtest-mm.patch \
file://0001-scenario_groups-default-remove-connectors.patch \
+ file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \
"
S = "${WORKDIR}/git"
--
2.45.0
prev parent reply other threads:[~2024-05-07 1:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 1:14 [PATCH 01/10] rng-tools: ignore incompatible-pointer-types errors for now Khem Raj
2024-05-07 1:14 ` [PATCH 02/10] expect: ignore various issues now fatal with gcc-14 Khem Raj
2024-05-07 1:14 ` [PATCH 03/10] libunwind: " Khem Raj
2024-05-07 1:14 ` [PATCH 04/10] zip lrzsz connman-gnome kea libfm: ignore various issues " Khem Raj
2024-05-07 5:07 ` Martin Jansa
2024-05-07 5:25 ` Khem Raj
2024-05-07 1:14 ` [PATCH 05/10] p11-kit: ignore various issues fatal with gcc-14 (for 32bit MACHINEs) Khem Raj
2024-05-07 1:14 ` [PATCH 06/10] pcmanfm: Disable incompatible-pointer-types warning as error Khem Raj
2024-05-07 1:14 ` [PATCH 07/10] kea: Remove -fvisibility-inlines-hidden from C++ flags Khem Raj
2024-05-07 10:07 ` [OE-core] " Alexander Kanavin
2024-05-07 1:14 ` [PATCH 08/10] consolekit: Disable incompatible-pointer-types warning as error Khem Raj
2024-05-07 1:14 ` [PATCH 09/10] gtk4: Disable int-conversion " Khem Raj
2024-05-07 1:14 ` Khem Raj [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240507011455.313230-10-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox