]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-common: do not fail preprocessor when intellisense is parsing the header
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 3 Jul 2025 00:21:19 +0000 (01:21 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 3 Jul 2025 00:21:19 +0000 (01:21 +0100)
Just like coverity or clang analyzer, intellisense will parse _sd-common.h and
fail because of the #error so skip it like the others

src/systemd/_sd-common.h

index bf2e20e201132d49eb6f5d7eb08b152f37d0192d..715b3ca297edc69a68c55a1cf150846bc7f974cb 100644 (file)
@@ -26,7 +26,7 @@
 
 /* This is a private header; never even think of including this directly! */
 
-#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1 && !defined(__COVERITY__) && !defined(__clang_analyzer__)
+#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1 && !defined(__COVERITY__) && !defined(__clang_analyzer__) && !defined(__INTELLISENSE__)
 #  error "Do not include _sd-common.h directly; it is a private header."
 #endif