From 486552e377ee1408af0aa7abed83cef224a2d07f Mon Sep 17 00:00:00 2001 From: davidkaroly <92124087+davidkaroly@users.noreply.github.com> Date: Fri, 17 Dec 2021 16:44:43 +0000 Subject: [PATCH] make: fix build after dirent refactor (#6436) --- sys-devel/make/make-4.1.recipe | 2 +- sys-devel/make/make-4.2.1.recipe | 2 +- sys-devel/make/make-4.3.recipe | 2 +- sys-devel/make/patches/make-4.1.patchset | 27 ++++++++++++++++++++-- sys-devel/make/patches/make-4.2.1.patchset | 27 ++++++++++++++++++++-- sys-devel/make/patches/make-4.3.patchset | 27 ++++++++++++++++++++-- 6 files changed, 78 insertions(+), 9 deletions(-) diff --git a/sys-devel/make/make-4.1.recipe b/sys-devel/make/make-4.1.recipe index 178a58d37..12f521a5e 100644 --- a/sys-devel/make/make-4.1.recipe +++ b/sys-devel/make/make-4.1.recipe @@ -8,7 +8,7 @@ that it is possible to use Make to build and install the program." HOMEPAGE="http://www.gnu.org/software/make/" COPYRIGHT="1988-2010 Free Software Foundation, Inc." LICENSE="GNU GPL v3" -REVISION="4" +REVISION="5" SOURCE_URI="http://ftp.gnu.org/pub/gnu/make/make-$portVersion.tar.bz2" CHECKSUM_SHA256="0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5" PATCHES="make-$portVersion.patchset" diff --git a/sys-devel/make/make-4.2.1.recipe b/sys-devel/make/make-4.2.1.recipe index a5f3d21ec..20ee268d6 100644 --- a/sys-devel/make/make-4.2.1.recipe +++ b/sys-devel/make/make-4.2.1.recipe @@ -8,7 +8,7 @@ that it is possible to use Make to build and install the program." HOMEPAGE="https://www.gnu.org/software/make/" COPYRIGHT="1988-2016 Free Software Foundation, Inc." LICENSE="GNU GPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="http://ftpmirror.gnu.org/make/make-$portVersion.tar.bz2" CHECKSUM_SHA256="d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589" PATCHES="make-$portVersion.patchset" diff --git a/sys-devel/make/make-4.3.recipe b/sys-devel/make/make-4.3.recipe index 5e384b91f..7992f0925 100644 --- a/sys-devel/make/make-4.3.recipe +++ b/sys-devel/make/make-4.3.recipe @@ -8,7 +8,7 @@ that it is possible to use Make to build and install the program." HOMEPAGE="https://www.gnu.org/software/make/" COPYRIGHT="1988-2020 Free Software Foundation, Inc." LICENSE="GNU GPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="http://ftpmirror.gnu.org/make/make-$portVersion.tar.gz" CHECKSUM_SHA256="e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19" PATCHES="make-$portVersion.patchset" diff --git a/sys-devel/make/patches/make-4.1.patchset b/sys-devel/make/patches/make-4.1.patchset index 5fdffd356..20c4a82ea 100644 --- a/sys-devel/make/patches/make-4.1.patchset +++ b/sys-devel/make/patches/make-4.1.patchset @@ -1,4 +1,4 @@ -From aa0681736940d18a5eb4a7bfad3b70f77159ef83 Mon Sep 17 00:00:00 2001 +From 5a4095825a8f4d65bfabb6f784503b53c2cbbf77 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 26 Feb 2016 14:51:15 +0000 Subject: Haiku patch @@ -18,5 +18,28 @@ index 24286fd..768bbfe 100644 # else /* These platforms don't have but have archives in the same format -- -2.2.2 +2.30.2 + + +From a1217a6b3f8a251d5283f93b24a0a2eaddc5609f Mon Sep 17 00:00:00 2001 +From: David Karoly +Date: Sun, 21 Nov 2021 15:21:15 +0000 +Subject: fix build + + +diff --git a/dir.c b/dir.c +index 7e00b8f..d87adb9 100644 +--- a/dir.c ++++ b/dir.c +@@ -1142,7 +1142,7 @@ read_dirstream (__ptr_t stream) + /* The glob interface wants a 'struct dirent', so mock one up. */ + struct dirent *d; + unsigned int len = df->length + 1; +- unsigned int sz = sizeof (*d) - sizeof (d->d_name) + len; ++ unsigned int sz = offsetof (struct dirent, d_name) + len; + if (sz > bufsz) + { + bufsz *= 2; +-- +2.30.2 diff --git a/sys-devel/make/patches/make-4.2.1.patchset b/sys-devel/make/patches/make-4.2.1.patchset index fc0ea3fb2..18c3725a1 100644 --- a/sys-devel/make/patches/make-4.2.1.patchset +++ b/sys-devel/make/patches/make-4.2.1.patchset @@ -1,4 +1,4 @@ -From aa0681736940d18a5eb4a7bfad3b70f77159ef83 Mon Sep 17 00:00:00 2001 +From 4640a0506a0131c3d8177b6ed36e200f8b3fe0bc Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 26 Feb 2016 14:51:15 +0000 Subject: Haiku patch @@ -18,5 +18,28 @@ index 549fe1e..17430f5 100644 # else /* These platforms don't have but have archives in the same format -- -2.2.2 +2.30.2 + + +From 265416e233141f66e2a5cdf9c06e4a5e1e52bf48 Mon Sep 17 00:00:00 2001 +From: David Karoly +Date: Sun, 21 Nov 2021 15:36:01 +0000 +Subject: fix build + + +diff --git a/dir.c b/dir.c +index f34bbf5..984f863 100644 +--- a/dir.c ++++ b/dir.c +@@ -1222,7 +1222,7 @@ read_dirstream (__ptr_t stream) + /* The glob interface wants a 'struct dirent', so mock one up. */ + struct dirent *d; + unsigned int len = df->length + 1; +- unsigned int sz = sizeof (*d) - sizeof (d->d_name) + len; ++ unsigned int sz = offsetof (struct dirent, d_name) + len; + if (sz > bufsz) + { + bufsz *= 2; +-- +2.30.2 diff --git a/sys-devel/make/patches/make-4.3.patchset b/sys-devel/make/patches/make-4.3.patchset index f347d4308..a9d3929c8 100644 --- a/sys-devel/make/patches/make-4.3.patchset +++ b/sys-devel/make/patches/make-4.3.patchset @@ -1,4 +1,4 @@ -From aa0681736940d18a5eb4a7bfad3b70f77159ef83 Mon Sep 17 00:00:00 2001 +From f41f5ce2f53d1094f9070e428b0d58a679a1b178 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 26 Feb 2016 14:51:15 +0000 Subject: Haiku patch @@ -18,5 +18,28 @@ index 3ce21db..45bbe0f 100644 # else /* These platforms don't have but have archives in the same format -- -2.28.0 +2.30.2 + + +From e38f464cbf874ee7fc19a77d7f00bd29600bd31f Mon Sep 17 00:00:00 2001 +From: David Karoly +Date: Sun, 21 Nov 2021 15:47:19 +0000 +Subject: fix build + + +diff --git a/src/dir.c b/src/dir.c +index 862a18e..620ca26 100644 +--- a/src/dir.c ++++ b/src/dir.c +@@ -1226,7 +1226,7 @@ read_dirstream (__ptr_t stream) + /* The glob interface wants a 'struct dirent', so mock one up. */ + struct dirent *d; + size_t len = df->length + 1; +- size_t sz = sizeof (*d) - sizeof (d->d_name) + len; ++ size_t sz = offsetof (struct dirent, d_name) + len; + if (sz > bufsz) + { + bufsz *= 2; +-- +2.30.2