[OE-core] [PATCH 3/7] xf86-video-intel: Fix for glibc

Khem Raj raj.khem at gmail.com
Mon Aug 13 18:02:07 UTC 2018


On Mon, Aug 13, 2018 at 7:29 AM Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
>
> It fails to build wi9th glibc 2.28, add the missing required header inclusion.
>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> ---
>  .../xorg-driver/xf86-video-intel/glibc.patch  | 25 +++++++++++++++++++
>  .../xorg-driver/xf86-video-intel_git.bb       |  1 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 meta/recipes-graphics/xorg-driver/xf86-video-intel/glibc.patch
>
> diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/glibc.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/glibc.patch
> new file mode 100644
> index 00000000000..ada9eb5e52c
> --- /dev/null
> +++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/glibc.patch
> @@ -0,0 +1,25 @@
> +Add a missing include needed for glibc 2.28 to avoid:
> +
> +| ../../git/tools/backlight_helper.c: In function 'main':
> +| ../../git/tools/backlight_helper.c:54:34: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration]
> +|   if (fd < 0 || fstat(fd, &st) || major(st.st_dev))
> +|                                   ^~~~~
> +| ../../git/tools/backlight_helper.c:54:34: warning: nested extern declaration of 'major' [-Wnested-externs]
> +| cc1: some warnings being treated as errors
> +| Makefile:666: recipe for target 'backlight_helper.o' failed
> +
> +Upstream-Status: Pending
> +RP 2018/8/12
> +
> +Index: git/tools/backlight_helper.c
> +===================================================================
> +--- git.orig/tools/backlight_helper.c
> ++++ git/tools/backlight_helper.c
> +@@ -8,6 +8,7 @@
> +
> + #include <sys/types.h>
> + #include <sys/stat.h>
> ++#include <sys/sysmacros.h>

for OE this is perfectly fine, however, I think if we checked for this
header in configure.ac with AC_CHECK_HEADERS and then did a
conditional include e..g

#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
#endif

will make it upstream-able since this header is relatively new in glibc

> +
> + #if MAJOR_IN_MKDEV
> + #include <sys/mkdev.h>
> diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
> index 5cc4eefc785..655fd4dc692 100644
> --- a/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
> +++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
> @@ -15,6 +15,7 @@ S = "${WORKDIR}/git"
>
>  SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel \
>             file://0001-Add-Coffeelake-PCI-IDs-for-S-Skus.patch \
> +           file://glibc.patch \
>             "
>
>  UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list