kmsdrm: Make this build with significantly older system libraries.

This allows one to build Raspberry Pi versions on an ancient version of
Raspbian and get both the KMSDRM and RPI video targets built into SDL, giving
maximum binary compatibility from linking against an older glibc, etc, but
also making one library that can access video on all RPi models and OS
releases.
This commit is contained in:
Ryan C. Gordon
2020-10-26 09:49:09 -04:00
parent f0c5841714
commit 010d5fba93
3 changed files with 26 additions and 18 deletions

View File

@@ -46,6 +46,14 @@
#include <errno.h>
#include <poll.h>
/* for older KMSDRM headers... */
#ifndef DRM_FORMAT_MOD_VENDOR_NONE
#define DRM_FORMAT_MOD_VENDOR_NONE 0
#endif
#ifndef DRM_FORMAT_MOD_LINEAR
#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0)
#endif
#define KMSDRM_DRI_PATH "/dev/dri/"
#define AMDGPU_COMPAT 1