Skip to contentSkip to conversation

libwnck: fix build failure for lib32-libwnck

PATCH New Gyorgy Sarvari 1 participant 2 messages Sep 11, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libwnck: fix build failure for lib32-libwnck

From: Changqing Li <[email protected]>

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,
      |                                                            ~~~~~~~~~~~~~~~~~~~^~~~~~
---
 ...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
meta-gnome/recipes-gnome/libwnck/files/0001-tasklist.c-fix-Wincompatible-pointer-types-error.patch new file +42 -0
new file mode 100644
index 0000000000..4e23f613aa
@@ -0,0 +1,42 @@
+From 01d9add9f9c25442329879d1c3513c68ed14a749 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta-gnome/recipes-gnome/libwnck/libwnck_2.31.0.bb +2 -0
index d7f47002f8..5552d2e2b9 100644
@@ -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"
 
#1 lore raw

PATCH 2/2 libnwck/libnwck3: use time_t to avoid build failure

From: Chen Qi <[email protected]>

The time_t type varies for 64bit and 32bit. So instead of using long long, we should just use time_t. In this way, things build for both 64bit and 32bit targets.

---
 ...Fix-build-issue-caused-by-OE-core-changes-to-startup.patch | 4 ++--
 ...001-tasklist.c-fix-Wincompatible-pointer-types-error.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
meta-gnome/recipes-gnome/libwnck/files/0001-Fix-build-issue-caused-by-OE-core-changes-to-startup.patch +2 -2
index 0328202f1b..f16f3e1d97 100644
@@ -23,7 +23,7 @@ Upstream-Status: Inappropriate [oe-specific]
 Signed-off-by: Koen Kooi <[email protected]>
 
 Refresh the patch
-Don't use explicit type cast to avoid truncation, use long long for tv_sec.
+Don't use explicit type cast to avoid truncation, use time_t for tv_sec.
 
 Signed-off-by: Changqing Li <[email protected]>
 
@@ -40,7 +40,7 @@ index 7418f89..f0f30b2 100644
    GList *tmp;
    gint64 now;
 -  long tv_sec, tv_usec;
-+  long long tv_sec;
++  time_t tv_sec;
 +  long tv_usec;
    double elapsed;
  
meta-gnome/recipes-gnome/libwnck/files/0001-tasklist.c-fix-Wincompatible-pointer-types-error.patch +1 -1
index 4e23f613aa..d9ca1f0cd9 100644
@@ -32,7 +32,7 @@ index 4f0c6c4..758fc5f 100644
    GList *tmp;
    GTimeVal now;
 -  long tv_sec, tv_usec;
-+  long long tv_sec;
++  time_t tv_sec;
 +  long tv_usec;
    double elapsed;