Compiling context.c includes regex.h unknown type name 'namespace'

The Makefile is trying to make glfw and I’m getting an error compiling contex.c which includes internal.h in turn includes x11_platform.h that in turn includes linux_joystick.h that on line 30 includes /usr/include/regex.h that has on line 31 an unknown type name ‘namespace’

Has anyone hit this issue before?

Thanks!

Carl

What linux distribution are you running this on?

If it is debian/ubuntu based, can you run dpkg-query -S /usr/include/regex.h to see which package owns this file? It should be libc6-dev.

Screenshot 2023-04-06 at 7.21.05 PM
Centos 7.x

Have you installed glibc-headers package? It seems it provides proper regex.h header - I checked that here: https://centos.pkgs.org/7/centos-x86_64/glibc-headers-2.17-317.el7.x86_64.rpm.html

Try removing glibc-headers package, then check that /usr/include/regex.h file is removed. Then install glibc-headers again.

That solution worked!

MMozeiko gets ALL the stars.