Add environ as a link seam for platform APIs
Allow precise redirection of platform-related APIs (such as those
provided by libc) for the purpose of unit tests.
Change-Id: I615b25805fc7a24eb5d67e87237bf35c8e262b93
Signed-off-by: Amithash Prasad <amithash@meta.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/compiler.h b/src/compiler.h
index c10ebfe..75b746a 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -21,6 +21,7 @@
"`unused` attribute is required");
static_assert(__has_attribute(warn_unused_result),
"`warn_unused_result` attribute is required");
+ static_assert(__has_attribute(weak), "`weak` attribute is required");
int compliance;
} pldm_required_attributes __attribute__((unused));
@@ -36,6 +37,7 @@
#define LIBPLDM_CC_NONNULL_ARGS(...) __attribute__((nonnull(__VA_ARGS__)))
#define LIBPLDM_CC_UNUSED __attribute__((unused))
#define LIBPLDM_CC_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#define LIBPLDM_CC_WEAK __attribute__((weak))
// NOLINTBEGIN(bugprone-macro-parentheses)
/**