Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 1 | From c79a3fb51718c4286b74edf0f758df9219994844 Mon Sep 17 00:00:00 2001 |
| 2 | From: Olivier Fourdan <ofourdan@redhat.com> |
| 3 | Date: Wed, 14 Sep 2022 09:07:10 +0200 |
| 4 | Subject: [PATCH] wayland-info: Fix build without libdrm |
| 5 | |
| 6 | wayland-info can optionally use libdrm to provide a description of the |
| 7 | dmabuf format modifiers. |
| 8 | |
| 9 | When not using libdrm however, the build fails because "dev_t" is not |
| 10 | defined. |
| 11 | |
| 12 | The definition of "dev_t" comes from <sys/types.h> which is included |
| 13 | from <libdrm.h>, which is not included without libdrm support, hence the |
| 14 | build failure. |
| 15 | |
| 16 | Simply include <sys/types.h> unconditionally to make sure "dev_t" is |
| 17 | defined regardless of libdrm support, to fix the build failure. |
| 18 | |
| 19 | Closes: https://gitlab.freedesktop.org/wayland/wayland-utils/-/issues/6 |
| 20 | Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> |
| 21 | Fixes: 240cb739 - "Add support for linux_dmabuf version 4" |
| 22 | Reviewed-by: Simon Ser <contact@emersion.fr> |
| 23 | Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com> |
| 24 | |
| 25 | Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/wayland-utils/-/commit/baa65ba9f62e6a05c32b9202b524158a21f24245] |
| 26 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
| 27 | --- |
| 28 | wayland-info/wayland-info.c | 1 + |
| 29 | 1 file changed, 1 insertion(+) |
| 30 | |
| 31 | diff --git a/wayland-info/wayland-info.c b/wayland-info/wayland-info.c |
| 32 | index 53cd04b..98ff205 100644 |
| 33 | --- a/wayland-info/wayland-info.c |
| 34 | +++ b/wayland-info/wayland-info.c |
| 35 | @@ -34,6 +34,7 @@ |
| 36 | #include <ctype.h> |
| 37 | #include <unistd.h> |
| 38 | #include <sys/mman.h> |
| 39 | +#include <sys/types.h> |
| 40 | |
| 41 | #include <wayland-client.h> |
| 42 | #if HAVE_HUMAN_FORMAT_MODIFIER |