diff -up glew-2.2.0/include/GL/glew.h~ glew-2.2.0/include/GL/glew.h --- glew-2.2.0/include/GL/glew.h~ 2020-03-15 12:53:59.000000000 +0100 +++ glew-2.2.0/include/GL/glew.h 2022-02-22 23:17:58.889834158 +0100 @@ -220,7 +220,8 @@ typedef _W64 int ptrdiff_t; */ #if defined(__APPLE__) || defined(__linux__) -# if defined(__cplusplus) +/* GCC12 errors out when including with __cplusplus < 201103L */ +# if defined(__cplusplus) && __cplusplus >= 201103L # include # include # else