Skip to content

Commit 5810411

Browse files
committed
API: Undefine API_DEPRECATED to fix macos build issue
Related-to: #284 Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
1 parent b892a91 commit 5810411

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

include/osdp_export.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@
4848

4949
/* ---------- Deprecation (with message) ---------- */
5050

51+
/*
52+
* Undefine API_DEPRECATED before redefining it. On macOS the SDK header
53+
* <os/availability.h> defines API_DEPRECATED with a different signature
54+
* (platform/version specifiers, not a plain string), which causes macro
55+
* expansion errors when osdp.h uses OSDP_DEPRECATED_EXPORT("msg").
56+
*/
57+
#ifdef API_DEPRECATED
58+
#undef API_DEPRECATED
59+
#endif
60+
5161
/* Prefer C++ [[deprecated("msg")]] if available, otherwise compiler specifics. */
5262
#if defined(__cplusplus) && API_HAS_CPP_ATTR(deprecated)
5363
/* [[deprecated("msg")]] supported */

0 commit comments

Comments
 (0)