tests: use __typeof__ instead of typeof
authorSimon Ser <contact@emersion.fr>
Mon, 10 Jan 2022 13:50:05 +0000 (14:50 +0100)
committerSimon Ser <contact@emersion.fr>
Mon, 10 Jan 2022 13:51:09 +0000 (14:51 +0100)
typeof is a GNU extension. Compiler extensions should be prefixed
with __ per the C standard.

Signed-off-by: Simon Ser <contact@emersion.fr>
tests/os-wrappers-test.c

index aadb93b..8d8c3ab 100644 (file)
@@ -70,7 +70,7 @@ static int fall_back;
 
 #define REAL(func) (__interceptor_ ## func) ?                          \
        __interceptor_ ## func :                                        \
-       (typeof(&__interceptor_ ## func))dlsym(RTLD_NEXT, #func)
+       (__typeof__(&__interceptor_ ## func))dlsym(RTLD_NEXT, #func)
 
 DECL(int, socket, int, int, int);
 DECL(int, fcntl, int, int, ...);