diff options
Diffstat (limited to 'meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa')
-rw-r--r-- | meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch | 46 | ||||
-rw-r--r-- | meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch | 69 | ||||
-rw-r--r-- | meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb (renamed from meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb) | 7 |
3 files changed, 72 insertions, 50 deletions
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch deleted file mode 100644 index 6f9c39996b..0000000000 --- a/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch +++ /dev/null @@ -1,46 +0,0 @@ -From fe4f3c2a37a81201f463ff962364f014f50c9896 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Dec 2019 22:58:41 -0800 -Subject: [PATCH] Use CMAKE_INSTALL_<path> instead of hardcoding bin/lib/ - install paths - -Helps fix build/packaging issues on machines where default libdir is not -lib but say lib64 - -Upstream-Status: Submitted [https://github.com/tinyalsa/tinyalsa/pull/143] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - CMakeLists.txt | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cb31c58..1cc4a85 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,12 +41,20 @@ add_util("tinymix" "utils/tinymix.c") - install(FILES ${HDRS} - DESTINATION "include/tinyalsa") - -+if(NOT DEFINED CMAKE_INSTALL_LIBDIR) -+ set(CMAKE_INSTALL_LIBDIR lib) -+endif() -+ -+if(NOT DEFINED CMAKE_INSTALL_BINDIR) -+ set(CMAKE_INSTALL_BINDIR bin) -+endif() -+ - install(TARGETS "tinyalsa" - "tinyplay" - "tinycap" - "tinymix" - "tinypcminfo" -- RUNTIME DESTINATION "bin" -- ARCHIVE DESTINATION "lib" -- LIBRARY DESTINATION "lib") -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - --- -2.24.1 - diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch new file mode 100644 index 0000000000..64ebdb19c9 --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch @@ -0,0 +1,69 @@ +From 639650dd64e483074dd7c3c7ea6dc1b1bd542743 Mon Sep 17 00:00:00 2001 +From: alperak <alperyasinak1@gmail.com> +Date: Sun, 12 Nov 2023 20:16:55 +0300 +Subject: [PATCH] fixed compilation error caused by strncpy + +Issue: + https://github.com/tinyalsa/tinyalsa/issues/219 + +Fix: + https://github.com/tinyalsa/tinyalsa/pull/220 + https://github.com/tinyalsa/tinyalsa/pull/221 + +Upstream-Status: Submitted + +Signed-off-by: alperak <alperyasinak1@gmail.com> +--- + src/mixer_plugin.c | 8 +++++--- + src/pcm_plugin.c | 9 ++++++--- + 2 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/src/mixer_plugin.c b/src/mixer_plugin.c +index 34117a9..f608563 100644 +--- a/src/mixer_plugin.c ++++ b/src/mixer_plugin.c +@@ -82,7 +82,8 @@ static int mixer_plug_get_elem_id(struct mixer_plug_data *plug_data, + id->iface = ctl->iface; + + strncpy((char *)id->name, (char *)ctl->name, +- sizeof(id->name)); ++ sizeof(id->name) - 1); ++ ((char *)id->name)[sizeof(id->name) - 1] = '\0'; + + return 0; + } +@@ -100,8 +101,9 @@ static int mixer_plug_info_enum(struct snd_control *ctl, + + strncpy(einfo->value.enumerated.name, + val->texts[einfo->value.enumerated.item], +- sizeof(einfo->value.enumerated.name)); +- ++ sizeof(einfo->value.enumerated.name) - 1); ++ einfo->value.enumerated.name[sizeof(einfo->value.enumerated.name) - 1] = '\0'; ++ + return 0; + } + +diff --git a/src/pcm_plugin.c b/src/pcm_plugin.c +index 15bfc80..47bf4a5 100644 +--- a/src/pcm_plugin.c ++++ b/src/pcm_plugin.c +@@ -153,9 +153,12 @@ static int pcm_plug_info(struct pcm_plug_data *plug_data, + return ret; + } + +- strncpy((char *)info->id, name, sizeof(info->id)); +- strncpy((char *)info->name, name, sizeof(info->name)); +- strncpy((char *)info->subname, name, sizeof(info->subname)); ++ strncpy((char *)info->id, name, sizeof(info->id) - 1); ++ ((char *)info->id)[sizeof(info->id) - 1] = '\0'; ++ strncpy((char *)info->name, name, sizeof(info->name) - 1); ++ ((char *)info->name)[sizeof(info->name) - 1] = '\0'; ++ strncpy((char *)info->subname, name, sizeof(info->subname) - 1); ++ ((char *)info->subname)[sizeof(info->subname) - 1] = '\0'; + + info->subdevices_count = 1; + +-- +2.25.1 + diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb index 68cf8795a6..e261611afd 100644 --- a/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb @@ -4,13 +4,12 @@ HOMEPAGE = "https://github.com/tinyalsa/tinyalsa" SECTION = "libs/multimedia" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://NOTICE;md5=dbdefe400d894b510a9de14813181d0b" +LIC_FILES_CHKSUM = "file://NOTICE;md5=e04cd6fa58488e016f7fb648ebea1db4" -SRCREV = "8449529c7e50f432091539ba7b438e79b04059b5" +SRCREV = "1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d" SRC_URI = "git://github.com/tinyalsa/tinyalsa;branch=master;protocol=https \ - file://0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch \ + file://0001-fixed-compilation-error-caused-by-strncpy.patch \ " -PV = "1.1.1+git${SRCPV}" S = "${WORKDIR}/git" |