From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] squashfs-tools: include sysmacros.h for recent systems (glibc 2.28)
Date: Tue, 16 Oct 2018 10:44:10 +0200 [thread overview]
Message-ID: <20181016084410.5cmuppdcvp3nfomb@pengutronix.de> (raw)
In-Reply-To: <1539369758-28346-1-git-send-email-apr@cn-eng.de>
On Fri, Oct 12, 2018 at 08:42:38PM +0200, Andreas Pretzsch wrote:
> Since glibc 2.28 (and deprecated since 2.25), sys/sysmacros.h
> is no longer included from sys/types.h. Explicitly include it,
> to have minor(), major() and makedev() defined.
> Strictly speaking, it might make sense to replace these calls
> also with gnu_dev_minor() et al., as the above #define's are
> historical shortcuts, too...
>
> Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
> ---
> Hit me when building an old BSP (ptxdist 2016.01 based) on a recent
> machine (Ubuntu 18.10) with glibc 2.28. But as squashfs-tools in
> current ptxdist is the same, pretty sure it will bite there, too.
This seem likely. glibc 2.28 is not in debian unstable yet, so I didn't
notice this. Looks like I need to add a more modern test platform...
Michael
> Guess there should be no side-effects (with previous glibc versions)
> and on other build hosts (like BSD, MacOS, etc.), but didn't check.
> @ PTX: Probably better check before applying to mainline.
> @ PTX: Feel free to adapt patch in any way.
>
> ...cros-h-for-recent-systems-glibc-2-28.patch | 39 +++++++++++++++++++
> patches/squashfs4.3/series | 1 +
> 2 files changed, 40 insertions(+)
> create mode 100644 patches/squashfs4.3/include-sysmacros-h-for-recent-systems-glibc-2-28.patch
> create mode 100644 patches/squashfs4.3/series
>
> diff --git a/patches/squashfs4.3/include-sysmacros-h-for-recent-systems-glibc-2-28.patch b/patches/squashfs4.3/include-sysmacros-h-for-recent-systems-glibc-2-28.patch
> new file mode 100644
> index 000000000..f635af637
> --- /dev/null
> +++ b/patches/squashfs4.3/include-sysmacros-h-for-recent-systems-glibc-2-28.patch
> @@ -0,0 +1,39 @@
> +include sysmacros.h for recent systems (glibc 2.28)
> +
> +Since glibc 2.28 (and deprecated since 2.25), sys/sysmacros.h
> +is no longer included from sys/types.h. Explicitly include it,
> +to have minor(), major() and makedev() defined.
> +Strictly speaking, it might make sense to replace these calls
> +also with gnu_dev_minor() et al., as the above #define's are
> +historical shortcuts, too...
> +
> +Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
> +---
> + squashfs-tools/mksquashfs.c | 1 +
> + squashfs-tools/unsquashfs.c | 1 +
> + 2 files changed, 2 insertions(+)
> +
> +Index: b/squashfs-tools/mksquashfs.c
> +===================================================================
> +--- a/squashfs-tools/mksquashfs.c
> ++++ b/squashfs-tools/mksquashfs.c
> +@@ -34,6 +34,7 @@
> + #include <stdio.h>
> + #include <stddef.h>
> + #include <sys/types.h>
> ++#include <sys/sysmacros.h>
> + #include <sys/stat.h>
> + #include <fcntl.h>
> + #include <errno.h>
> +Index: b/squashfs-tools/unsquashfs.c
> +===================================================================
> +--- a/squashfs-tools/unsquashfs.c
> ++++ b/squashfs-tools/unsquashfs.c
> +@@ -33,6 +33,7 @@
> +
> + #include <sys/sysinfo.h>
> + #include <sys/types.h>
> ++#include <sys/sysmacros.h>
> + #include <sys/time.h>
> + #include <sys/resource.h>
> + #include <limits.h>
> diff --git a/patches/squashfs4.3/series b/patches/squashfs4.3/series
> new file mode 100644
> index 000000000..63fad652c
> --- /dev/null
> +++ b/patches/squashfs4.3/series
> @@ -0,0 +1 @@
> +include-sysmacros-h-for-recent-systems-glibc-2-28.patch
> --
> 2.17.1
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2018-10-16 8:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 18:42 Andreas Pretzsch
2018-10-16 8:44 ` Michael Olbrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181016084410.5cmuppdcvp3nfomb@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox