diff mbox series

[meta-multimedia,17/22] pipewire-0.2: Include time.h for timespec struct signature

Message ID 20240521181024.426176-17-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/22] libsdl: Fix build with musl | expand

Commit Message

Khem Raj May 21, 2024, 6:10 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...n-idle-Include-time.h-for-struct-tim.patch | 43 +++++++++++++++++++
 .../pipewire/pipewire-0.2_git.bb              |  4 +-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch b/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch
new file mode 100644
index 0000000000..ce381a78b3
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2/0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch
@@ -0,0 +1,43 @@ 
+From b1d911fdab4a583f276d18395037d90bfc305109 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 May 2024 18:12:23 -0700
+Subject: [PATCH] module-suspend-on-idle: Include time.h for struct timespec
+ decl
+
+This is flagged as error with gcc-14 on musl targets
+
+In file included from ../git/src/pipewire/loop.h:27,
+                 from ../git/src/pipewire/core.h:44,
+                 from ../git/src/modules/module-suspend-on-idle.c:26:
+../git/spa/include/spa/support/loop.h:184:37: warning: 'struct timespec' declared inside parameter list will not be visible outside of this definition or declaration
+  184 |                              struct timespec *value,
+      |                                     ^~~~~~~~
+../git/src/modules/module-suspend-on-idle.c: In function 'node_state_changed':
+../git/src/modules/module-suspend-on-idle.c:110:69: error: passing argument 2 of 'main_loop->utils->update_timer' from incompatible pointer type [-Wincompatible-pointer-types]
+  110 |                 pw_loop_update_timer(main_loop, info->idle_timeout, &value, NULL, false);
+      |                                                                     ^~~~~~
+      |                                                                     |
+      |                                                                     struct timespec *
+
+Upstream-Status: Inappropriate [Fixed in latest pipewire differently]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/modules/module-suspend-on-idle.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
+index e5c1fcb30..4dba3be71 100644
+--- a/src/modules/module-suspend-on-idle.c
++++ b/src/modules/module-suspend-on-idle.c
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <errno.h>
++#include <time.h>
+ 
+ #include "config.h"
+ 
+-- 
+2.45.1
+
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb
index 9895e89761..7c8afd3d51 100644
--- a/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire-0.2_git.bb
@@ -10,7 +10,9 @@  DEPENDS = "alsa-lib dbus udev"
 SRCREV = "14c11c0fe4d366bad4cfecdee97b6652ff9ed63d"
 PV = "0.2.7"
 
-SRC_URI = "git://github.com/PipeWire/pipewire;branch=master;protocol=https"
+SRC_URI = "git://github.com/PipeWire/pipewire;branch=master;protocol=https \
+           file://0001-module-suspend-on-idle-Include-time.h-for-struct-tim.patch \
+           "
 
 S = "${WORKDIR}/git"