package/squashfs: fix build on hosts with glibc >= 2.28
PATCH 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
Since glibc 2.28, sys/sysmacros.h is no longer included from sys/types.h This patch fixes the resulting build error by explicitly including sys/sysmacros.h
--- package/squashfs/0001-include-sysmacros.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/squashfs/0001-include-sysmacros.patch
package/squashfs/0001-include-sysmacros.patch new file +19 -0
@@ -0,0 +1,19 @@ +--- a/squashfs-tools/mksquashfs.c 2018-02-15 14:11:24.661930637 +0100 ++++ b/squashfs-tools/mksquashfs.c 2018-02-15 14:12:28.218412025 +0100 +@@ -44,6 +44,7 @@ + #include <setjmp.h> + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/mman.h> + #include <pthread.h> + #include <regex.h> + #include <sys/wait.h> +--- a/squashfs-tools/unsquashfs.c 2018-02-15 14:25:34.608263881 +0100 ++++ b/squashfs-tools/unsquashfs.c 2018-02-15 14:26:01.376410327 +0100 +@@ -36,6 +36,7 @@ + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/time.h> + #include <sys/resource.h> + #include <limits.h> + #include <ctype.h>
Signature · 1 line
2.18.0
PATCH 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
Hi Richard,
Thanks for your contribution. Please find a few comments below.
package/squashfs/0001-include-sysmacros.patch
Quoted 15 lines · Richard Kunze
Since glibc 2.28,
sys/sysmacros.his no longer included fromsys/types.hThis patch fixes the resulting build error by explicitly includingsys/sysmacros.hSigned-off-by Richard Kunze <[email protected]>--- package/squashfs/0001-include-sysmacros.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/squashfs/0001-include-sysmacros.patchpackage/squashfs/0001-include-sysmacros.patch new file +0
-0
Patches should have a description and sign-off. See the patches chapter in the Buildroot manual:
https://buildroot.org/downloads/manual/manual.html#patch-policy
It would also be nice to add a note about the upstream status of this patch.
Quoted 10 lines
package/squashfs/0001-include-sysmacros.patch new file +9
-0@@ -0,0 +1,19 @@ +--- a/squashfs-tools/mksquashfs.c 2018-02-15 14:11:24.661930637 +0100 ++++ b/squashfs-tools/mksquashfs.c 2018-02-15 14:12:28.218412025 +0100 +@@ -44,6 +44,7 @@ + #include <setjmp.h> + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/mman.h> + #include <pthread.h> + #include <regex.h>
package/squashfs/0001-include-sysmacros.patch line 19
Quoted 10 lines
package/squashfs/0001-include-sysmacros.patch new file +10
-0+ #include <sys/wait.h> +--- a/squashfs-tools/unsquashfs.c 2018-02-15 14:25:34.608263881 +0100 ++++ b/squashfs-tools/unsquashfs.c 2018-02-15 14:26:01.376410327 +0100 +@@ -36,6 +36,7 @@ + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/time.h> + #include <sys/resource.h> + #include <limits.h> + #include <ctype.h>
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
Hi Richard,
Il 27/08/2018 08:37, baruch at tkos.co.il (Baruch Siach) ha scritto:
Quoted 24 lines
Hi Richard,
Thanks for your contribution. Please find a few comments below.
package/squashfs/0001-include-sysmacros.patch
Quoted 15 lines · Richard Kunze
Since glibc 2.28,
sys/sysmacros.his no longer included fromsys/types.hThis patch fixes the resulting build error by explicitly includingsys/sysmacros.hSigned-off-by Richard Kunze <[email protected]>--- package/squashfs/0001-include-sysmacros.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)create mode 100644
package/squashfs/0001-include-sysmacros.patchpackage/squashfs/0001-include-sysmacros.patch new file +0
-0Patches should have a description and sign-off. See the patches chapter in the Buildroot manual:
Quoted 3 lines
https://buildroot.org/downloads/manual/manual.html#patch-policy
It would also be nice to add a note about the upstream status of this patch.
I've faced the same issue(glibc 2.28 sys/sysmacros.h) on atop package.
I point you the commit so you can inspire to that:
https://github.com/buildroot/buildroot/commit/4ffde065d2829d90cddc70f7c2e8f5775e59cbe9
Thomas Petazzoni helped me to write that commit log and improved it.
Sorry if there's some problem with e-mail answer but I've lost this e-mail and took it from archive by hand.
Giulio Benetti
PATCH 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
In reply to Baruch SiachHi Baruch,
thanks for your comments, I'll do a V2. But I'm not altogether sure how to go about it - see below.
Am Montag, den 27.08.2018, 09:37 +0300 schrieb Baruch Siach:
Quoted 9 lines
Patches should have a description and sign-off. See the patches chapter in the
Buildroot manual:https://buildroot.org/downloads/manual/manual.html#patch-policy
It would also be nice to add a note about the upstream status of this patch.
The problem here is I don't really know how to contact upstream.
The Buildroot makefile references
https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git but that has no bug tracker or contact information for patches. The original (?) site at sourceforge.net seems pretty much dead.
I finally found https://github.com/plougher/squashfs-tools which seems at least somewhat active, and there is already a pull request for the same problem: https://github.com/plougher/squashfs-tools/pull/52
Would it be OK to take the buildroot patch from this pull request as per Buildroot manual section 18.4?
Richard
PATCH 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Richard" == Richard Kunze <[email protected]> writes:
Hi,
Quoted 10 lines
Quoted 2 lines
It would also be nice to add a note about the upstream status of this patch.
The problem here is I don't really know how to contact upstream.
The Buildroot makefile references
https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git but that has no bug tracker or contact information for patches. The original (?) site at sourceforge.net seems pretty much dead.
Quoted 6 lines
I finally found https://github.com/plougher/squashfs-tools which seems at least somewhat active, and there is already a pull request for the same problem: https://github.com/plougher/squashfs-tools/pull/52
Would it be OK to take the buildroot patch from this pull request as per Buildroot manual section 18.4?
Yes, I believe so. plougher sounds like Phillip Lougher, the original author of squashfs, and patrickdepinguin (Thomas) is a regular buildroot contributor.
Will you send a patch? Thanks!
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
Since glibc 2.28, sys/sysmacros.h is no longer included from sys/types.h This patch fixes the resulting build error by explicitly including sys/sysmacros.h
See also https://github.com/plougher/squashfs-tools/pull/52
--- package/squashfs/0001-include-sysmacros.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/squashfs/0001-include-sysmacros.patch
package/squashfs/0001-include-sysmacros.patch new file +19 -0
@@ -0,0 +1,19 @@ +--- a/squashfs-tools/mksquashfs.c 2018-02-15 14:11:24.661930637 +0100 ++++ b/squashfs-tools/mksquashfs.c 2018-02-15 14:12:28.218412025 +0100 +@@ -44,6 +44,7 @@ + #include <setjmp.h> + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/mman.h> + #include <pthread.h> + #include <regex.h> + #include <sys/wait.h> +--- a/squashfs-tools/unsquashfs.c 2018-02-15 14:25:34.608263881 +0100 ++++ b/squashfs-tools/unsquashfs.c 2018-02-15 14:26:01.376410327 +0100 +@@ -36,6 +36,7 @@ + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/time.h> + #include <sys/resource.h> + #include <limits.h> + #include <ctype.h>
Signature · 1 line
2.18.0
PATCH v2 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
In reply to Peter KorsgaardSince glibc 2.28, sys/sysmacros.h is no longer included from sys/types.h This patch fixes the resulting build error by explicitly including sys/sysmacros.h
See also https://github.com/plougher/squashfs-tools/pull/52
--- package/squashfs/0001-include-sysmacros.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/squashfs/0001-include-sysmacros.patch
package/squashfs/0001-include-sysmacros.patch new file +47 -0
@@ -0,0 +1,47 @@ +From 968aa53dd6d2c0831a9af01873441767c06b88d0 Mon Sep 17 00:00:00 2001 +From: Thomas De Schampheleire <[email protected]> +Date: Wed, 1 Aug 2018 12:17:10 +0200 +Subject: [PATCH] mksquashfs/unsquashfs: fix compilation with glibc 2.25+ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From glibc 2.25 release notes: +https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html +"* The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated. + This means that in a future release, the macros ?major?, ?minor?, and + ?makedev? will only be available from <sys/sysmacros.h>." + +See glibc bug https://sourceware.org/bugzilla/show_bug.cgi?id=19239 . + +Fetch from: https://github.com/plougher/squashfs-tools/pull/52.patch +Signed-off-by: Richard Kunze <[email protected]> +--- + squashfs-tools/mksquashfs.c | 1 + + squashfs-tools/unsquashfs.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c +index d696a51..8d57c3e 100644 +--- a/squashfs-tools/mksquashfs.c ++++ b/squashfs-tools/mksquashfs.c +@@ -35,6 +35,7 @@ + #include <stddef.h> + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/sysmacros.h> + #include <fcntl.h> + #include <errno.h> + #include <dirent.h> +diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c +index a57f85c..a492b27 100644 +--- a/squashfs-tools/unsquashfs.c ++++ b/squashfs-tools/unsquashfs.c +@@ -33,6 +33,7 @@ + #include "fnmatch_compat.h" + + #include <sys/sysinfo.h> ++#include <sys/sysmacros.h> + #include <sys/types.h> + #include <sys/time.h> + #include <sys/resource.h>
Signature · 1 line
2.18.0
PATCH v2 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Richard" == Richard Kunze <[email protected]> writes:
Since glibc 2.28,
sys/sysmacros.his no longer included fromsys/types.hThis patch fixes the resulting build error by explicitly includingsys/sysmacros.hSee also https://github.com/plougher/squashfs-tools/pull/52
Signed-off-by Richard Kunze <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
In reply to Richard KunzeQuoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Richard" == Richard Kunze <[email protected]> writes:
Since glibc 2.28,
sys/sysmacros.his no longer included fromsys/types.hThis patch fixes the resulting build error by explicitly includingsys/sysmacros.hSee also https://github.com/plougher/squashfs-tools/pull/52
Signed-off-by Richard Kunze <[email protected]>
Committed to 2018.02.x and 2018.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/squashfs: fix build on hosts with glibc >= 2.28
In reply to Richard KunzeHi all,
El s?b., 1 sept. 2018 a las 17:01, Richard Kunze
(<[email protected]>) escribi?:
Quoted 19 lines
Hi Baruch,
thanks for your comments, I'll do a V2. But I'm not altogether sure how to go about it - see below.
Am Montag, den 27.08.2018, 09:37 +0300 schrieb Baruch Siach:
Quoted 9 lines
Patches should have a description and sign-off. See the patches chapter in the
Buildroot manual:https://buildroot.org/downloads/manual/manual.html#patch-policy
It would also be nice to add a note about the upstream status of this patch.
The problem here is I don't really know how to contact upstream.
Quoted 9 lines
The Buildroot makefile references
https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git but that has no bug tracker or contact information for patches. The original (?) site at sourceforge.net seems pretty much dead.I finally found https://github.com/plougher/squashfs-tools which seems at least somewhat active, and there is already a pull request for the same problem: https://github.com/plougher/squashfs-tools/pull/52
I recently learned that the squashfs GitHub page is not actually used for development and pull requests there are likely to be ignored. I will resubmit the patch to the corresponding mailing list from kernel.org. Hopefully there is more reaction there...
Thanks for importing it into Buildroot, I planned to do it but did not yet execute :-)
/Thomas