diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-02-28 23:23:55 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-02-28 23:23:55 +0000 |
commit | 1986226438581150c70592abbba6ba49e4c47931 (patch) | |
tree | fef077ec57d8eb8758b3c96d2b3b845ed58411da | |
parent | 766e1ed1810c11b9f62a2b74e224420695e54b57 (diff) | |
download | packages-1986226438581150c70592abbba6ba49e4c47931.tar.gz packages-1986226438581150c70592abbba6ba49e4c47931.tar.bz2 packages-1986226438581150c70592abbba6ba49e4c47931.tar.xz packages-1986226438581150c70592abbba6ba49e4c47931.zip |
system/libaio: Fix build for GCC 8
-rw-r--r-- | system/libaio/APKBUILD | 12 | ||||
-rw-r--r-- | system/libaio/improper-strncpy-usage.patch | 26 |
2 files changed, 33 insertions, 5 deletions
diff --git a/system/libaio/APKBUILD b/system/libaio/APKBUILD index b40b031aa..79ff0f628 100644 --- a/system/libaio/APKBUILD +++ b/system/libaio/APKBUILD @@ -2,16 +2,17 @@ # Maintainer: Dan Theisen <djt@hxx.in> pkgname="libaio" pkgver=0.3.111 -pkgrel=0 +pkgrel=1 pkgdesc="Asynchronous input/output library" url="http://lse.sourceforge.net/io/aio.html" arch="all" license="LGPL-2.1+" -depends= +depends="" makedepends="linux-headers" -install= subpackages="$pkgname-dev" -source="http://ftp.debian.org/debian/pool/main/liba/$pkgname/${pkgname}_${pkgver}.orig.tar.gz" +source="http://ftp.debian.org/debian/pool/main/liba/$pkgname/${pkgname}_${pkgver}.orig.tar.gz + improper-strncpy-usage.patch + " build() { cd "$builddir" @@ -29,4 +30,5 @@ package() { make prefix="$pkgdir/usr" install } -sha512sums="440f2b62f99ca2e72ffc8c2c04b4779a1a7cf24a8ba2a30b34d18b4ee77630a2078610fe8c435559f81a5c3bfa93049bd53d77464a0da8267833fbde3f40ceeb libaio_0.3.111.orig.tar.gz" +sha512sums="440f2b62f99ca2e72ffc8c2c04b4779a1a7cf24a8ba2a30b34d18b4ee77630a2078610fe8c435559f81a5c3bfa93049bd53d77464a0da8267833fbde3f40ceeb libaio_0.3.111.orig.tar.gz +8294a17b60676838375b3f17b84af19f3f3224788bdc944eda6b235305f48b6b292899f9d528be7b4b87305e7beac409afc0f250d052454b2a739bd990104b83 improper-strncpy-usage.patch" diff --git a/system/libaio/improper-strncpy-usage.patch b/system/libaio/improper-strncpy-usage.patch new file mode 100644 index 000000000..b2f6b86a4 --- /dev/null +++ b/system/libaio/improper-strncpy-usage.patch @@ -0,0 +1,26 @@ +It is invalid to use the src size as the strncpy size parameter. + +Found by GCC 8.3, fixed by awilfox. + +--- libaio-0.3.111/harness/cases/19.t.old 2018-03-06 22:24:47.000000000 +0000 ++++ libaio-0.3.111/harness/cases/19.t 2019-02-28 22:20:03.170000000 +0000 +@@ -41,7 +41,7 @@ + int fd; + char template[sizeof(TEMPLATE)]; + +- strncpy(template, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(template, TEMPLATE, sizeof(template)); + fd = mkostemp(template, O_DIRECT); + if (fd < 0) { + perror("mkstemp"); +--- libaio-0.3.111/harness/cases/21.t.old 2018-03-06 22:24:47.000000000 +0000 ++++ libaio-0.3.111/harness/cases/21.t 2019-02-28 22:20:13.120000000 +0000 +@@ -43,7 +43,7 @@ + int fd; + char temp_file[sizeof(TEMPLATE)]; + +- strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(temp_file, TEMPLATE, sizeof(temp_file)); + fd = mkstemp(temp_file); + if (fd < 0) { + perror("mkstemp"); |