https://issues.dlang.org/show_bug.cgi?id=24505
--- Comment #4 from kinke <ki...@gmx.net> --- (In reply to anonymous4 from comment #3) > Looks like a generic problem. How posix stat should work? It is a generic problem, one that we cannot solve elegantly in D/importC - we don't have an ugly 2-stage compilation like C(++), with preprocessor 'symbols'. But we need to be able to deal with this. In this concrete case, our interop code doesn't use `stat` in D at all, it's a totally uninteresting symbol, like ~99% of the C symbols dragged in by ~400k preprocessed lines. If one indeed depended on the `stat` macro, a solution could be to add a little wrapper in the .c file, letting the preprocessor do its magic, and then aliasing `stat` to that custom wrapper in the .d file importing the .c file. --