drm-shim build error with glibc 2.33
../src/drm-shim/drm_shim.c:79:23: error: ‘__xstat’ undeclared here (not in a function); did you mean ‘_xstate’?
79 | REAL_FUNCTION_POINTER(__xstat);
| ^~~~~~~
../src/drm-shim/drm_shim.c:55:41: note: in definition of macro ‘REAL_FUNCTION_POINTER’
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^
../src/drm-shim/drm_shim.c:80:23: error: ‘__xstat64’ undeclared here (not in a function); did you mean ‘_xstate’?
80 | REAL_FUNCTION_POINTER(__xstat64);
| ^~~~~~~~~
../src/drm-shim/drm_shim.c:55:41: note: in definition of macro ‘REAL_FUNCTION_POINTER’
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^
../src/drm-shim/drm_shim.c:81:23: error: ‘__fxstat’ undeclared here (not in a function)
81 | REAL_FUNCTION_POINTER(__fxstat);
| ^~~~~~~~
../src/drm-shim/drm_shim.c:55:41: note: in definition of macro ‘REAL_FUNCTION_POINTER’
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^
../src/drm-shim/drm_shim.c:82:23: error: ‘__fxstat64’ undeclared here (not in a function); did you mean ‘fstat64’?
82 | REAL_FUNCTION_POINTER(__fxstat64);
| ^~~~~~~~~~
../src/drm-shim/drm_shim.c:55:41: note: in definition of macro ‘REAL_FUNCTION_POINTER’
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^
../src/drm-shim/drm_shim.c:276:12: error: no previous prototype for ‘__xstat’ [-Werror=missing-prototypes]
276 | PUBLIC int __xstat(int ver, const char *path, struct stat *st)
| ^~~~~~~
../src/drm-shim/drm_shim.c: In function ‘__xstat’:
../src/drm-shim/drm_shim.c:284:14: error: called object ‘real___xstat’ is not a function or function pointer
284 | return real___xstat(ver, path, st);
| ^~~~~~~~~~~~
../src/drm-shim/drm_shim.c:55:45: note: declared here
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^~~~~
../src/drm-shim/drm_shim.c:79:1: note: in expansion of macro ‘REAL_FUNCTION_POINTER’
79 | REAL_FUNCTION_POINTER(__xstat);
| ^~~~~~~~~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c:300:14: error: called object ‘real___xstat’ is not a function or function pointer
300 | return real___xstat(ver, path, st);
| ^~~~~~~~~~~~
../src/drm-shim/drm_shim.c:55:45: note: declared here
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^~~~~
../src/drm-shim/drm_shim.c:79:1: note: in expansion of macro ‘REAL_FUNCTION_POINTER’
79 | REAL_FUNCTION_POINTER(__xstat);
| ^~~~~~~~~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c: At top level:
../src/drm-shim/drm_shim.c:310:12: error: no previous prototype for ‘__xstat64’ [-Werror=missing-prototypes]
310 | PUBLIC int __xstat64(int ver, const char *path, struct stat64 *st)
| ^~~~~~~~~
../src/drm-shim/drm_shim.c: In function ‘__xstat64’:
../src/drm-shim/drm_shim.c:318:14: error: called object ‘real___xstat64’ is not a function or function pointer
318 | return real___xstat64(ver, path, st);
| ^~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c:55:45: note: declared here
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^~~~~
../src/drm-shim/drm_shim.c:80:1: note: in expansion of macro ‘REAL_FUNCTION_POINTER’
80 | REAL_FUNCTION_POINTER(__xstat64);
| ^~~~~~~~~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c:334:14: error: called object ‘real___xstat64’ is not a function or function pointer
334 | return real___xstat64(ver, path, st);
| ^~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c:55:45: note: declared here
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^~~~~
../src/drm-shim/drm_shim.c:80:1: note: in expansion of macro ‘REAL_FUNCTION_POINTER’
80 | REAL_FUNCTION_POINTER(__xstat64);
| ^~~~~~~~~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c: At top level:
../src/drm-shim/drm_shim.c:344:12: error: no previous prototype for ‘__fxstat’ [-Werror=missing-prototypes]
344 | PUBLIC int __fxstat(int ver, int fd, struct stat *st)
| ^~~~~~~~
../src/drm-shim/drm_shim.c: In function ‘__fxstat’:
../src/drm-shim/drm_shim.c:351:14: error: called object ‘real___fxstat’ is not a function or function pointer
351 | return real___fxstat(ver, fd, st);
| ^~~~~~~~~~~~~
../src/drm-shim/drm_shim.c:55:45: note: declared here
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^~~~~
../src/drm-shim/drm_shim.c:81:1: note: in expansion of macro ‘REAL_FUNCTION_POINTER’
81 | REAL_FUNCTION_POINTER(__fxstat);
| ^~~~~~~~~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c: At top level:
../src/drm-shim/drm_shim.c:360:12: error: no previous prototype for ‘__fxstat64’ [-Werror=missing-prototypes]
360 | PUBLIC int __fxstat64(int ver, int fd, struct stat64 *st)
| ^~~~~~~~~~
../src/drm-shim/drm_shim.c: In function ‘__fxstat64’:
../src/drm-shim/drm_shim.c:367:14: error: called object ‘real___fxstat64’ is not a function or function pointer
367 | return real___fxstat64(ver, fd, st);
| ^~~~~~~~~~~~~~~
../src/drm-shim/drm_shim.c:55:45: note: declared here
55 | #define REAL_FUNCTION_POINTER(x) typeof(x) *real_##x
| ^~~~~
../src/drm-shim/drm_shim.c:82:1: note: in expansion of macro ‘REAL_FUNCTION_POINTER’
82 | REAL_FUNCTION_POINTER(__fxstat64);
| ^~~~~~~~~~~~~~~~~~~~~
cc: @anholt