From 1d5c7091b8e43bb8b837258bc796095afbe96ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 1 Jul 2018 18:17:03 +0200 Subject: [PATCH] liblo. Fix build with gcc >= 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- .../files/0001-Fix-build-with-GCC-8.patch | 36 +++++++++++++++++++ .../recipes-multimedia/liblo/liblo_0.29.bb | 5 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 recipes-misc/recipes-multimedia/liblo/files/0001-Fix-build-with-GCC-8.patch diff --git a/recipes-misc/recipes-multimedia/liblo/files/0001-Fix-build-with-GCC-8.patch b/recipes-misc/recipes-multimedia/liblo/files/0001-Fix-build-with-GCC-8.patch new file mode 100644 index 00000000..2ba1b108 --- /dev/null +++ b/recipes-misc/recipes-multimedia/liblo/files/0001-Fix-build-with-GCC-8.patch @@ -0,0 +1,36 @@ +From 74621a7d961b792fb5a9399b6f40ef633ebc5339 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 1 Jul 2018 18:10:10 +0200 +Subject: [PATCH] Fix build with GCC >= 8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +| ../../liblo-0.29/src/server.c:324:13: error: 'strncpy' specified bound 1024 equals destination size [-Werror=stringop-truncation] +| strncpy(hostname, he->h_name, sizeof(hostname)); +| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| cc1: all warnings being treated as errors + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + src/server.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/server.c b/src/server.c +index 01fa08f..e94a453 100644 +--- a/src/server.c ++++ b/src/server.c +@@ -321,7 +321,7 @@ void lo_server_resolve_hostname(lo_server s) + gethostname(hostname, sizeof(hostname)); + he = gethostbyname(hostname); + if (he) { +- strncpy(hostname, he->h_name, sizeof(hostname)); ++ strncpy(hostname, he->h_name, sizeof(hostname)-1); + } + } + +-- +2.14.4 + diff --git a/recipes-misc/recipes-multimedia/liblo/liblo_0.29.bb b/recipes-misc/recipes-multimedia/liblo/liblo_0.29.bb index ceea8c72..48becba8 100644 --- a/recipes-misc/recipes-multimedia/liblo/liblo_0.29.bb +++ b/recipes-misc/recipes-multimedia/liblo/liblo_0.29.bb @@ -5,6 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" inherit autotools pkgconfig -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz" +SRC_URI = " \ + ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ + file://0001-Fix-build-with-GCC-8.patch \ +" SRC_URI[md5sum] = "b0e70bc0fb2254addf94adddf85cffd3" SRC_URI[sha256sum] = "ace1b4e234091425c150261d1ca7070cece48ee3c228a5612d048116d864c06a"