diff options
Diffstat (limited to 'sysutils/acpica-utils')
6 files changed, 77 insertions, 3 deletions
diff --git a/sysutils/acpica-utils/Makefile b/sysutils/acpica-utils/Makefile index dc8138c7d76..44aa82e2ddc 100644 --- a/sysutils/acpica-utils/Makefile +++ b/sysutils/acpica-utils/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.10 2016/10/14 10:31:12 maya Exp $ +# $NetBSD: Makefile,v 1.11 2018/10/27 21:44:53 abs Exp $ # DISTNAME= acpica-unix2-20160930 PKGNAME= ${DISTNAME:S/-unix2-/-utils-/} +PKGREVISION= 1 CATEGORIES= sysutils devel MASTER_SITES= https://acpica.org/sites/acpica/files/ @@ -51,4 +52,10 @@ do-test: # This test is broken too # cd ${WRKSRC}/tests/templates && gmake +.include "../../mk/compiler.mk" + +.if !empty(CC_VERSION:Mgcc-8*) +CFLAGS+= -Wno-error=format-truncation +.endif + .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/acpica-utils/distinfo b/sysutils/acpica-utils/distinfo index 1ceb1a4bcd5..ed67f09d3a1 100644 --- a/sysutils/acpica-utils/distinfo +++ b/sysutils/acpica-utils/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.13 2018/09/17 13:11:59 maya Exp $ +$NetBSD: distinfo,v 1.14 2018/10/27 21:44:53 abs Exp $ SHA1 (acpica-unix2-20160930.tar.gz) = 45b1d14454b8986ed56ec81c217694131becbcbf RMD160 (acpica-unix2-20160930.tar.gz) = f58d5cbfe516340f168b8e2090c656097c7964cd @@ -9,5 +9,8 @@ RMD160 (acpitests-unix-20160930.tar.gz) = f9d3e152191c2595301e2356441fca8630c36b SHA512 (acpitests-unix-20160930.tar.gz) = f982826e01de7a79da543c2ca99dfc9459829a03332841dfe00f45bfc1620bdfa986a5ce4c8bbee2933325c1c526434c04e3601d727fb111f049e71e080a4c71 Size (acpitests-unix-20160930.tar.gz) = 1829886 bytes SHA1 (patch-generate_unix_Makefile.config) = b760ec07afa96902641ff4b979b7764baa39aceb -SHA1 (patch-source_include_platform_acnetbsd.h) = d272a3c84d337c2da44d83b37efb81f83a213a39 +SHA1 (patch-source_compiler_aslanalyze.c) = fae01580943d61dd907bd2835be432258f972f7d +SHA1 (patch-source_compiler_aslpredef.c) = 1d4c9a5fe0ad437f55b0381761ed128624fc220d +SHA1 (patch-source_compiler_aslwalks.c) = 7c18ed4005c383020f94c71a2fc5ee2f768fcb07 +SHA1 (patch-source_include_platform_acnetbsd.h) = 004db064e8ff8c2bc5314d6d506e9da8d281376d SHA1 (patch-source_include_platform_acsolaris.h) = ecc090345a6d259f96923376e65d28c57dceebab diff --git a/sysutils/acpica-utils/patches/patch-source_compiler_aslanalyze.c b/sysutils/acpica-utils/patches/patch-source_compiler_aslanalyze.c new file mode 100644 index 00000000000..a6d95dbf6a3 --- /dev/null +++ b/sysutils/acpica-utils/patches/patch-source_compiler_aslanalyze.c @@ -0,0 +1,15 @@ +$NetBSD: patch-source_compiler_aslanalyze.c,v 1.1 2018/10/27 21:44:53 abs Exp $ + +Avoid potential sprintf buffer overflow reported by gcc 8.2.0 + +--- source/compiler/aslanalyze.c.orig 2016-09-30 16:43:56.000000000 +0000 ++++ source/compiler/aslanalyze.c +@@ -355,7 +355,7 @@ AnCheckMethodReturnValue ( + */ + if (ThisNodeBtype != 0) + { +- sprintf (MsgBuffer, ++ snprintf (MsgBuffer, sizeof(MsgBuffer), + "Method returns [%s], %s operator requires [%s]", + StringBuffer, OpInfo->Name, StringBuffer2); + diff --git a/sysutils/acpica-utils/patches/patch-source_compiler_aslpredef.c b/sysutils/acpica-utils/patches/patch-source_compiler_aslpredef.c new file mode 100644 index 00000000000..5f4ddd26ba8 --- /dev/null +++ b/sysutils/acpica-utils/patches/patch-source_compiler_aslpredef.c @@ -0,0 +1,30 @@ +$NetBSD: patch-source_compiler_aslpredef.c,v 1.1 2018/10/27 21:44:53 abs Exp $ + +Avoid potential sprintf buffer overflow reported by gcc 8.2.0 + +--- source/compiler/aslpredef.c.orig 2016-09-30 16:43:57.000000000 +0000 ++++ source/compiler/aslpredef.c +@@ -162,7 +162,7 @@ ApCheckForPredefinedMethod ( + AcpiUtGetExpectedReturnTypes (StringBuffer, + ThisName->Info.ExpectedBtypes); + +- sprintf (MsgBuffer, "%s required for %4.4s", ++ snprintf (MsgBuffer, sizeof(MsgBuffer), "%s required for %4.4s", + StringBuffer, ThisName->Info.Name); + + AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op, +@@ -700,12 +700,12 @@ TypeErrorExit: + + if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT) + { +- sprintf (MsgBuffer, "%4.4s: found %s, %s required", ++ snprintf (MsgBuffer, sizeof(MsgBuffer), "%4.4s: found %s, %s required", + PredefinedName, TypeName, StringBuffer); + } + else + { +- sprintf (MsgBuffer, "%4.4s: found %s at index %u, %s required", ++ snprintf (MsgBuffer, sizeof(MsgBuffer), "%4.4s: found %s at index %u, %s required", + PredefinedName, TypeName, PackageIndex, StringBuffer); + } + diff --git a/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c b/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c new file mode 100644 index 00000000000..736bbc980b5 --- /dev/null +++ b/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c @@ -0,0 +1,15 @@ +$NetBSD: patch-source_compiler_aslwalks.c,v 1.1 2018/10/27 21:44:53 abs Exp $ + +Avoid potential sprintf buffer overflow reported by gcc 8.2.0 + +--- source/compiler/aslwalks.c.orig 2016-09-30 16:43:57.000000000 +0000 ++++ source/compiler/aslwalks.c +@@ -511,7 +511,7 @@ AnOperandTypecheckWalkEnd ( + AnFormatBtype (StringBuffer, ThisNodeBtype); + AnFormatBtype (StringBuffer2, RequiredBtypes); + +- sprintf (MsgBuffer, "[%s] found, %s operator requires [%s]", ++ snprintf (MsgBuffer, sizeof(MsgBuffer), "[%s] found, %s operator requires [%s]", + StringBuffer, OpInfo->Name, StringBuffer2); + + AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, diff --git a/sysutils/acpica-utils/patches/patch-source_include_platform_acnetbsd.h b/sysutils/acpica-utils/patches/patch-source_include_platform_acnetbsd.h index 84d00638f84..fdde9cc9609 100644 --- a/sysutils/acpica-utils/patches/patch-source_include_platform_acnetbsd.h +++ b/sysutils/acpica-utils/patches/patch-source_include_platform_acnetbsd.h @@ -1,3 +1,7 @@ +$NetBSD: patch-source_include_platform_acnetbsd.h,v 1.2 2018/10/27 21:44:53 abs Exp $ + +NetBSD versions prior to 7 lack sem_timedwait() in librt + --- source/include/platform/acnetbsd.h.orig 2015-04-10 17:27:17.000000000 +0200 +++ source/include/platform/acnetbsd.h 2015-12-10 14:15:22.000000000 +0100 @@ -112,4 +112,10 @@ |