Compiling the following C code:
#include <string.h>
void foo()
{
memset(0, 0, 0);
}
Results in the following error:
foo.c(5): Error: undefined identifier `__builtin___memset_chk`
If I run the C code manually through the preprocessor this is the relevant output:
void foo()
{
__builtin___memset_chk (0, 0, 0, __builtin_object_size (0, 0));
}
I'm using macOS 13.0.1, DMD v2.101.1 and Xcode 14.2.
Comment #1 by ibuclaw — 2022-12-27T23:20:13Z
What happens if you add the following before the string.h include?
#define __USE_FORTIFY_LEVEL 0
Comment #2 by doob — 2022-12-28T07:41:51Z
(In reply to Iain Buclaw from comment #1)
> What happens if you add the following before the string.h include?
>
> #define __USE_FORTIFY_LEVEL 0
No changes. I get the same error.