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 <a...@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 <a...@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

Reply via email to