Also, just because some code appears "gray colored" (disabled) in your text-editor (IDE), e.g. Eclipse, it does not mean that this code is actually disabled from the actual compiler's perspective!
Most text-editor targeted for program code have some, more or less, advanced "syntax highlighting" capabilities. When it comes to C/C++ preprocessor directives, the text-editor will have to make some educated guesses about which macros are defined (or not), in order to decide whether code sections enclosed in #ifdef's is enabled (or not). But only the compiler will have the full picture and know for sure...
If you can not change the code in question, and if that code does#include the file "stld1553_nix.h", then yes, you will have to provide that file for the compilation to succeed ;-)
That is unless the #include directive is guarded by an ifdef or ifndef – in which case you could prevent the #include by (un)defining the respective macro, e.g by passing -DNAME or -UNAME on the command-line.
If, in fact, you can change the code, then you can simply remove the #include, if you want... 🙃