mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 23:48:20 +00:00
libmpd: Fix function returns and casts
Fixes build with clang-15 Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
--- libmpd-11.8.17/src/libmpd-internal.h.orig 2014-09-30 04:08:50.963292427 +0200
|
||||
+++ libmpd-11.8.17/src/libmpd-internal.h 2014-09-30 04:08:30.595292223 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
#define __MPD_INTERNAL_LIB_
|
||||
|
||||
#include "libmpdclient.h"
|
||||
+#include "config.h"
|
||||
struct _MpdData_real;
|
||||
|
||||
typedef struct _MpdData_real {
|
||||
@@ -0,0 +1,27 @@
|
||||
From f0f8cc5ac6f1fa9cb5c98cb0b3688f44c64fa8ee Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Wed, 19 Jul 2017 14:22:48 +0200
|
||||
Subject: [PATCH 1/3] fix return makes integer from pointer without a cast
|
||||
|
||||
Upstream-Status: Pending [https://github.com/archlinux/svntogit-packages/tree/packages/libmpd/trunk]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/libmpd-playlist.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libmpd-playlist.c b/src/libmpd-playlist.c
|
||||
index c3c30ec..64c64ea 100644
|
||||
--- a/src/libmpd-playlist.c
|
||||
+++ b/src/libmpd-playlist.c
|
||||
@@ -780,7 +780,7 @@ int mpd_playlist_load(MpdObj *mi, const char *path)
|
||||
if(mpd_lock_conn(mi))
|
||||
{
|
||||
debug_printf(DEBUG_ERROR,"lock failed\n");
|
||||
- return NULL;
|
||||
+ return MPD_LOCK_FAILED;
|
||||
}
|
||||
mpd_sendLoadCommand(mi->connection,path);
|
||||
mpd_finishCommand(mi->connection);
|
||||
--
|
||||
2.37.2
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From fa3b3b3759986171a85230ba8b53764beafdb37f Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Wed, 19 Jul 2017 14:40:00 +0200
|
||||
Subject: [PATCH 2/3] fix comparison between pointer and zero character constant
|
||||
|
||||
Upstream-Status: Pending [https://github.com/archlinux/svntogit-packages/tree/packages/libmpd/trunk]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/libmpd-database.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libmpd-database.c b/src/libmpd-database.c
|
||||
index 2480d5e..edafc0a 100644
|
||||
--- a/src/libmpd-database.c
|
||||
+++ b/src/libmpd-database.c
|
||||
@@ -961,7 +961,7 @@ MpdData * mpd_database_get_directory_recursive(MpdObj *mi, const char *path)
|
||||
debug_printf(DEBUG_WARNING,"not connected\n");
|
||||
return NULL;
|
||||
}
|
||||
- if(path == '\0' || path[0] == '\0')
|
||||
+ if(path == NULL || path[0] == '\0')
|
||||
{
|
||||
debug_printf(DEBUG_ERROR, "argumant invalid\n");
|
||||
return NULL;
|
||||
--
|
||||
2.37.2
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 67eae4f20af9aaaf693025d95a05527a2c1fed1a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Wed, 19 Jul 2017 14:38:43 +0200
|
||||
Subject: [PATCH 3/3] include config.h
|
||||
|
||||
Upstream-Status: Pending [https://github.com/archlinux/svntogit-packages/tree/packages/libmpd/trunk]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/libmpd-strfsong.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/libmpd-strfsong.c b/src/libmpd-strfsong.c
|
||||
index 7d47bed..76fa3ff 100644
|
||||
--- a/src/libmpd-strfsong.c
|
||||
+++ b/src/libmpd-strfsong.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
+#include <config.h>
|
||||
#include "libmpd.h"
|
||||
#include "libmpd-internal.h"
|
||||
|
||||
--
|
||||
2.37.2
|
||||
|
||||
@@ -5,9 +5,10 @@ HOMEPAGE ="http://sourceforge.net/projects/musicpd"
|
||||
DEPENDS = "glib-2.0"
|
||||
|
||||
SRC_URI = "http://www.musicpd.org/download/${BPN}/${PV}/${BP}.tar.gz \
|
||||
file://glibc-2.20.patch \
|
||||
file://0001-fix-return-makes-integer-from-pointer-without-a-cast.patch \
|
||||
file://0002-fix-comparison-between-pointer-and-zero-character-co.patch \
|
||||
file://0003-include-config.h.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "5ae3d87467d52aef3345407adb0a2488"
|
||||
SRC_URI[sha256sum] = "fe20326b0d10641f71c4673fae637bf9222a96e1712f71f170fca2fc34bf7a83"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
Reference in New Issue
Block a user