From 9ed60cc5ff71b6c98ea334c2569bccb81b275563 Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Thu, 22 Aug 2024 13:44:11 -0700
Subject: [PATCH] Add macro name as comment for header guard #endif
Change-Id: Ic7abcd1211bfd5b58fcd845f689b3dc00fd38499
---
build/cmake/rtcd.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/build/cmake/rtcd.pl b/build/cmake/rtcd.pl
index 5d889cb748..464d1986c7 100755
--- a/build/cmake/rtcd.pl
+++ b/build/cmake/rtcd.pl
@@ -264,13 +264,14 @@ ()
}
sub common_bottom() {
+ my $include_guard = uc($opts{sym})."_H_";
print <<EOF;
#ifdef __cplusplus
} // extern "C"
#endif
-#endif
+#endif // ${include_guard}
EOF
}