Skip to content

Commit

Permalink
Window/Unix: Fix compilation with glxext header versions >=20180525
Browse files Browse the repository at this point in the history
When mesa updated their headers, they changed the include guard
from __glxext_h_ to __glx_glxext_h_, which breaks compilation
due to conflicting declarations. This commit modifies the preprocessor
directives to allow for compilation with older and newer mesa header
versions.
Fixes: #1472
  • Loading branch information
ShadowsFriend authored and eXpl0it3r committed Aug 28, 2018
1 parent be3556d commit 87aaa9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SFML/Window/Unix/GlxExtensions.hpp
Expand Up @@ -25,11 +25,12 @@
#ifndef SF_POINTER_C_GENERATED_HEADER_GLXWIN_HPP
#define SF_POINTER_C_GENERATED_HEADER_GLXWIN_HPP

#ifdef __glxext_h_
#if defined(__glxext_h_) || defined(__glx_glxext_h_)
#error Attempt to include glx_exts after including glxext.h
#endif

#define __glxext_h_
#define __glx_glxext_h_

#include <X11/Xlib.h>
#include <X11/Xutil.h>
Expand Down

0 comments on commit 87aaa9e

Please sign in to comment.