openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [meta-gnome][PATCH 1/2] libwnck: fix build failure for lib32-libwnck
@ 2025-08-28  4:54 changqing.li
  2025-08-28  4:54 ` [meta-gnome][PATCH 2/2] libwnck3: fix build failure for lib32-libwnck3 changqing.li
  0 siblings, 1 reply; 2+ messages in thread
From: changqing.li @ 2025-08-28  4:54 UTC (permalink / raw)
  To: openembedded-devel

From: Changqing Li <changqing.li@windriver.com>

Fix the following compile error:
../../sources/libwnck-2.31.0/libwnck/tasklist.c:4355:49: error: passing argument 2 of 'sn_startup_sequence_get_last_active_time' from incompatible pointer type [-Wincompatible-pointer-types]
 4355 |                                                 &tv_sec, &tv_usec);
      |                                                 ^~~~~~~
      |                                                 |
      |                                                 long int *
In file included from /build/tmp/work/core2-32-wrsmllib32-linux/lib32-libwnck/2.31.0/lib32-recipe-sysroot/usr/include/startup-notification-1.0/libsn/sn.h:32,
                 from ../../sources/libwnck-2.31.0/libwnck/private.h:36,
                 from ../../sources/libwnck-2.31.0/libwnck/tasklist.c:40:
/build/tmp/work/core2-32-wrsmllib32-linux/lib32-libwnck/2.31.0/lib32-recipe-sysroot/usr/include/startup-notification-1.0/libsn/sn-monitor.h:84:79: note: expected 'time_t *' {aka 'long long int *'} but argument is of type 'long int *'
   84 |                                                            time_t            *tv_sec,
      |                                                            ~~~~~~~~~~~~~~~~~~~^~~~~~

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 ...ix-Wincompatible-pointer-types-error.patch | 42 +++++++++++++++++++
 .../recipes-gnome/libwnck/libwnck_2.31.0.bb   |  2 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/libwnck/files/0001-tasklist.c-fix-Wincompatible-pointer-types-error.patch

diff --git a/meta-gnome/recipes-gnome/libwnck/files/0001-tasklist.c-fix-Wincompatible-pointer-types-error.patch b/meta-gnome/recipes-gnome/libwnck/files/0001-tasklist.c-fix-Wincompatible-pointer-types-error.patch
new file mode 100644
index 0000000000..4e23f613aa
--- /dev/null
+++ b/meta-gnome/recipes-gnome/libwnck/files/0001-tasklist.c-fix-Wincompatible-pointer-types-error.patch
@@ -0,0 +1,42 @@
+From 01d9add9f9c25442329879d1c3513c68ed14a749 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 28 Aug 2025 10:29:59 +0800
+Subject: [PATCH] tasklist.c: fix -Wincompatible-pointer-types error
+
+Fix the following compile error:
+../../sources/libwnck-2.31.0/libwnck/tasklist.c:4355:49: error: passing argument 2 of 'sn_startup_sequence_get_last_active_time' from incompatible pointer type [-Wincompatible-pointer-types]
+ 4355 |                                                 &tv_sec, &tv_usec);
+      |                                                 ^~~~~~~
+      |                                                 |
+      |                                                 long int *
+In file included from /build/tmp/work/core2-32-wrsmllib32-linux/lib32-libwnck/2.31.0/lib32-recipe-sysroot/usr/include/startup-notification-1.0/libsn/sn.h:32,
+                 from ../../sources/libwnck-2.31.0/libwnck/private.h:36,
+                 from ../../sources/libwnck-2.31.0/libwnck/tasklist.c:40:
+/build/tmp/work/core2-32-wrsmllib32-linux/lib32-libwnck/2.31.0/lib32-recipe-sysroot/usr/include/startup-notification-1.0/libsn/sn-monitor.h:84:79: note: expected 'time_t *' {aka 'long long int *'} but argument is of type 'long int *'
+   84 |                                                            time_t            *tv_sec,
+      |                                                            ~~~~~~~~~~~~~~~~~~~^~~~~~
+
+Upstream-Status: Inappropriate [ Latest master don't have this code ]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ libwnck/tasklist.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
+index 4f0c6c4..758fc5f 100644
+--- a/libwnck/tasklist.c
++++ b/libwnck/tasklist.c
+@@ -4340,7 +4340,8 @@ sequence_timeout_callback (void *user_data)
+   WnckTasklist *tasklist = user_data;
+   GList *tmp;
+   GTimeVal now;
+-  long tv_sec, tv_usec;
++  long long tv_sec;
++  long tv_usec;
+   double elapsed;
+ 
+   g_get_current_time (&now);
+-- 
+2.34.1
+
diff --git a/meta-gnome/recipes-gnome/libwnck/libwnck_2.31.0.bb b/meta-gnome/recipes-gnome/libwnck/libwnck_2.31.0.bb
index d7f47002f8..5552d2e2b9 100644
--- a/meta-gnome/recipes-gnome/libwnck/libwnck_2.31.0.bb
+++ b/meta-gnome/recipes-gnome/libwnck/libwnck_2.31.0.bb
@@ -12,6 +12,8 @@ GNOMEBASEBUILDCLASS = "autotools"
 inherit gnomebase gobject-introspection features_check gtk-doc
 REQUIRED_DISTRO_FEATURES = "x11"
 
+SRC_URI += "file://0001-tasklist.c-fix-Wincompatible-pointer-types-error.patch"
+
 SRC_URI[archive.md5sum] = "f03e1139296e2a3a92e3b65a3080cd32"
 SRC_URI[archive.sha256sum] = "83f732d20781fc88b22cdc6aaf2d4f388db6d3d4ff28d1a8fd45be9fb7743a9e"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-gnome][PATCH 2/2] libwnck3: fix build failure for lib32-libwnck3
  2025-08-28  4:54 [meta-gnome][PATCH 1/2] libwnck: fix build failure for lib32-libwnck changqing.li
@ 2025-08-28  4:54 ` changqing.li
  0 siblings, 0 replies; 2+ messages in thread
From: changqing.li @ 2025-08-28  4:54 UTC (permalink / raw)
  To: openembedded-devel

From: Changqing Li <changqing.li@windriver.com>

Refresh patch for fix build issue

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 ...caused-by-OE-core-changes-to-startup.patch | 33 +++++++++++--------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch b/meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch
index 91e23c785b..0328202f1b 100644
--- a/meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch
+++ b/meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch
@@ -1,4 +1,4 @@
-From 1df0f4ae8fd54bc1ae940dfafa701c84d068674d Mon Sep 17 00:00:00 2001
+From fd075074182f756e2872569925f70f5f4e2386c2 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Sun, 25 May 2025 12:24:16 +0000
 Subject: [PATCH] Fix build issue caused by OE-core changes to
@@ -21,23 +21,30 @@ It is caused by a patch of startup-notification in oe-core which is backported f
 Upstream-Status: Inappropriate [oe-specific]
 
 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+Refresh the patch
+Don't use explicit type cast to avoid truncation, use long long for tv_sec.
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
 ---
- libwnck/tasklist.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ libwnck/tasklist.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
-index 7418f89..460e11d 100644
+index 7418f89..f0f30b2 100644
 --- a/libwnck/tasklist.c
 +++ b/libwnck/tasklist.c
-@@ -5031,7 +5031,7 @@ sequence_timeout_callback (void *user_data)
-       WnckTask *task = WNCK_TASK (tmp->data);
- 
-       sn_startup_sequence_get_last_active_time (task->startup_sequence,
--                                                &tv_sec, &tv_usec);
-+                                                (time_t *) &tv_sec, &tv_usec);
- 
-       elapsed = (now - (tv_sec * G_USEC_PER_SEC + tv_usec)) / 1000.0;
+@@ -5019,7 +5019,8 @@ sequence_timeout_callback (void *user_data)
+   WnckTasklist *tasklist = user_data;
+   GList *tmp;
+   gint64 now;
+-  long tv_sec, tv_usec;
++  long long tv_sec;
++  long tv_usec;
+   double elapsed;
  
+   now = g_get_real_time ();
 -- 
-2.33.0
+2.34.1
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-28  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28  4:54 [meta-gnome][PATCH 1/2] libwnck: fix build failure for lib32-libwnck changqing.li
2025-08-28  4:54 ` [meta-gnome][PATCH 2/2] libwnck3: fix build failure for lib32-libwnck3 changqing.li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).