]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-json: also skip assert_cc in VS Code parser
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 13 Feb 2026 19:34:09 +0000 (19:34 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 27 Feb 2026 21:57:05 +0000 (21:57 +0000)
For some reason the VS Code parser thinks sd_json_variant is still 48 bytes,
so skip the assert when running in that parser too

Follow-up for 337712e777bff389f53e26d5b378d2ceba7d98a8

(cherry picked from commit 5b822977c29e8351d0a56f32ddc49b54c4479089)
(cherry picked from commit edb737a8ec3d9289b8b5196161ca8ddc8c009b95)
(cherry picked from commit d445dc0c70eff2fa6de672705ee8296214ea885b)

src/libsystemd/sd-json/sd-json.c

index 42156fc744012d0a3a119674213f4b02edeab8f4..ce368764b5e4013d21b6e0579d03961aef2dfdb2 100644 (file)
@@ -137,7 +137,7 @@ struct sd_json_variant {
 
 /* Let's make sure this structure isn't increased in size accidentally. This check is only for our most relevant arch
  * (x86-64). */
-#if defined(__x86_64__) && __SIZEOF_POINTER__ == 8
+#if defined(__x86_64__) && __SIZEOF_POINTER__ == 8 && !defined(__EDG__)
 assert_cc(sizeof(sd_json_variant) == 40U);
 assert_cc(INLINE_STRING_MAX == 7U);
 #endif