Skip to content
  • Emil Velikov's avatar
    mesa_glinterop: allow building without X and related headers · c85b34ff
    Emil Velikov authored
    This commit effectively reverts c10dcb2c
    and fixes the typedef redefinition which inspired it.
    
    In order to prevent requiring X packages at build time earlier commit
    forward declared the required X/GLX typedefs. Since that approach
    introduced typedef redefinition (a C11 feature) it was reverted.
    
    To avoid the redefinition while _not_ mandating X and related headers
    forward declare the structs and use those through the header.
    
    As anyone uses the mesa interop header they ensure that the X (or others
    in terms of EGL) headers are included, which ensures that everything is
    resolved within the compilation unit.
    
    Cc: Vinson Lee <vlee@freedesktop.org>
    Cc: "12.0" <mesa-stable@lists.freedesktop.org>
    Cc: Tapani Pälli <tapani.palli@intel.com>
    Cc: Chih-Wei Huang <cwhuang@android-x86.org>
    Fixes: c10dcb2c ("Revert "mesa_glinterop: remove inclusion of GLX
    header"")
    Fixes: 8472045b ("mesa_glinterop: remove inclusion of GLX header")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770
    
    
    Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
    Tested-by: default avatarVinson Lee <vlee@freedesktop.org>
    Reviewed-by: default avatarTapani Pälli <tapani.palli@intel.com>
    c85b34ff