drm: guard Linux-specific headers behind check in drm_mode.h
Subsystems (2)
PATCH 1/1 drm: guard Linux-specific headers behind check in drm_mode.h
Non-Linux systems (e.g. FreeBSD) ship drm_mode.h but don't have Linux headers. This causes build failures [1].
Guard Linux-specific header #include behind Linux checks (kernel and user-space). The macros depending on these headers are not usable, but this at least unblocks libdrm upgrades. A future patch may re-implement the required macros.
[1]: https://gitlab.freedesktop.org/mesa/libdrm/-/merge_requests/462#note_3473512
Signed-off-by Simon Ser <[email protected]>
Fixes 4c684596cde4 ("drm: Add CRTC background color property")
Cc Cristian Ciocaltea <[email protected]>
Cc Matt Roper <[email protected]>
Cc Nícolas F. R. A. Prado <[email protected]>
Cc Daniel Stone <[email protected]>
--- include/uapi/drm/drm_mode.h | 2 ++ 1 file changed, 2 insertions(+)
include/uapi/drm/drm_mode.h +2 -0
@@ -10,8 +10,10 @@#ifndef _DRM_MODE_H#define _DRM_MODE_H +#if defined(__KERNEL__) || defined(__linux__)#include <linux/bits.h> #include <linux/const.h> +#endif #include "drm.h"
Signature · 1 line
2.56.0
Hi, could anyone review this patch? It's blocking libdrm header upgrades.