Fix clang
jvoisin opened this issue · 1 comments
jvoisin commented
In /usr/include/x86_64-linux-gnu/sys/cdefs.h
, there is the following:
/* Fortify support. */
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
#define __bos0(ptr) __builtin_object_size (ptr, 0)
and for some reasons, clang thinks it's a great idea to go look there, colliding with our own __bos
macro:
$ ~/dev/fortify-headers make -C tests/ clean clang
make: Entering directory '/home/jvoisin/dev/fortify-headers/tests'
In file included from test_FD_CLR_SETSIZE.c:1:
In file included from ./common.h:19:
In file included from ../include/unistd.h:26:
../include/fortify-headers.h:63:9: warning: '__bos' macro redefined [-Wmacro-redefined]
#define __bos(ptr, type) __builtin_dynamic_object_size (ptr, type)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:123:9: note: previous definition is here
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
$