Skip to content

Commit 6b06176

Browse files
committed
API: Reorder attribute macros for Clang compatibility
Clang requires [[deprecated]] to appear before GNU-style attributes like __attribute__((visibility("default"))), while GCC accepts both orders. Switch API_DEPRECATED and API_EXPORT order in OSDP_DEPRECATED_EXPORT to ensure compatibility across compilers. Fixes: #248 Signed-off-by: Siddharth Chandrasekaran <[email protected]>
1 parent 11a424f commit 6b06176

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/osdp_export.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
/* ---------- helpers ---------- */
7171
#define OSDP_EXPORT API_EXPORT
7272
#define OSDP_NO_EXPORT API_NO_EXPORT
73-
#define OSDP_DEPRECATED_EXPORT(msg) API_EXPORT API_DEPRECATED(msg)
74-
#define OSDP_DEPRECATED_NO_EXPORT(msg) API_NO_EXPORT API_DEPRECATED(msg)
73+
#define OSDP_DEPRECATED_EXPORT(msg) API_DEPRECATED(msg) API_EXPORT
74+
#define OSDP_DEPRECATED_NO_EXPORT(msg) API_DEPRECATED(msg) API_NO_EXPORT
7575

7676
#endif /* _OSDP_EXPORT_H_ */

0 commit comments

Comments
 (0)