From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1 1/1] package/libdrm: fix build failure
Date: Sat, 6 Jun 2020 11:11:44 +0200 [thread overview]
Message-ID: <20200606091144.GA13972@scaer> (raw)
In-Reply-To: <20200606064309.3466-1-heiko.thiery@gmail.com>
Heiko, All,
On 2020-06-06 08:43 +0200, Heiko Thiery spake thusly:
> Add patch to fix build failure with Sourcery Codebench toolchain.
>
> The patch is provided upstream:
> https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/75
>
> Fixes:
> http://autobuild.buildroot.net/results/b7910460015b077fcb2431da608c34f95c2f2fbb/
>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> .../0003-xf86drm.c-fix-build-failure.patch | 84 +++++++++++++++++++
> 1 file changed, 84 insertions(+)
> create mode 100644 package/libdrm/0003-xf86drm.c-fix-build-failure.patch
>
> diff --git a/package/libdrm/0003-xf86drm.c-fix-build-failure.patch b/package/libdrm/0003-xf86drm.c-fix-build-failure.patch
> new file mode 100644
> index 0000000000..ba84114f14
> --- /dev/null
> +++ b/package/libdrm/0003-xf86drm.c-fix-build-failure.patch
> @@ -0,0 +1,84 @@
> +From c7d89412884de2dbfa543720d185027377e62f21 Mon Sep 17 00:00:00 2001
> +From: Heiko Thiery <heiko.thiery@gmail.com>
> +Date: Fri, 5 Jun 2020 23:46:52 +0200
> +Subject: [PATCH] xf86drm.c: fix build failure
> +
> +./xf86drm.c: In function 'drmNodeIsDRM':
> +../xf86drm.c:2825:7: error: "__FreeBSD__" is not defined [-Werror=undef]
> + #elif __FreeBSD__
> + ^
> +../xf86drm.c: In function 'drmGetMinorNameForFD':
> +../xf86drm.c:2938:7: error: "__FreeBSD__" is not defined [-Werror=undef]
> + #elif __FreeBSD__
> + ^
> +../xf86drm.c: In function 'drmParsePciBusInfo':
> +../xf86drm.c:3258:7: error: "__FreeBSD__" is not defined [-Werror=undef]
> + #elif __FreeBSD__
> + ^
> +../xf86drm.c: In function 'drmParsePciDeviceInfo':
> +../xf86drm.c:3427:7: error: "__FreeBSD__" is not defined [-Werror=undef]
> + #elif __FreeBSD__
> + ^
> +../xf86drm.c: In function 'drmGetDeviceNameFromFd2':
> +../xf86drm.c:4305:7: error: "__FreeBSD__" is not defined [-Werror=undef]
> + #elif __FreeBSD__
> + ^
> +
> +Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> +[A merge-request with this fix is opened at https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/75]
> +---
> + xf86drm.c | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/xf86drm.c b/xf86drm.c
> +index 07a18c44..50a6f092 100644
> +--- a/xf86drm.c
> ++++ b/xf86drm.c
> +@@ -2822,7 +2822,7 @@ static bool drmNodeIsDRM(int maj, int min)
> + snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm",
> + maj, min);
> + return stat(path, &sbuf) == 0;
> +-#elif __FreeBSD__
> ++#elif defined(__FreeBSD__)
> + char name[SPECNAMELEN];
> +
> + if (!devname_r(makedev(maj, min), S_IFCHR, name, sizeof(name)))
> +@@ -2935,7 +2935,7 @@ static char *drmGetMinorNameForFD(int fd, int type)
> +
> + closedir(sysdir);
> + return NULL;
> +-#elif __FreeBSD__
> ++#elif defined(__FreeBSD__)
> + struct stat sbuf;
> + char dname[SPECNAMELEN];
> + const char *mname;
> +@@ -3255,7 +3255,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)
> + info->func = pinfo.func;
> +
> + return 0;
> +-#elif __FreeBSD__
> ++#elif defined(__FreeBSD__)
> + return get_sysctl_pci_bus_info(maj, min, info);
> + #else
> + #warning "Missing implementation of drmParsePciBusInfo"
> +@@ -3424,7 +3424,7 @@ static int drmParsePciDeviceInfo(int maj, int min,
> + device->subdevice_id = pinfo.subdevice_id;
> +
> + return 0;
> +-#elif __FreeBSD__
> ++#elif defined(__FreeBSD__)
> + drmPciBusInfo info;
> + struct pci_conf_io pc;
> + struct pci_match_conf patterns[1];
> +@@ -4302,7 +4302,7 @@ drm_public char *drmGetDeviceNameFromFd2(int fd)
> + free(value);
> +
> + return strdup(path);
> +-#elif __FreeBSD__
> ++#elif defined(__FreeBSD__)
> + return drmGetDeviceNameFromFd(fd);
> + #else
> + struct stat sbuf;
> +--
> +2.20.1
> +
> --
> 2.20.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2020-06-06 9:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 6:43 [Buildroot] [PATCH v1 1/1] package/libdrm: fix build failure Heiko Thiery
2020-06-06 9:11 ` Yann E. MORIN [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=20200606091144.GA13972@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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