Skip to content

Commit 42eecf2

Browse files
committed
Fix OG_COUNTED_BY compacibility issue on Linux
1 parent c5bf7d7 commit 42eecf2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/OpenGraph_SPI/include/OGBase.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@
4343
#define OG_CONSTEXPR
4444
#endif
4545

46-
#define OG_COUNTED_BY(N) __counted_by(N)
46+
#if __has_attribute(__counted_by__)
47+
#define OG_COUNTED_BY(N) __attribute__((__counted_by__(N)))
48+
#else
49+
#define OG_COUNTED_BY(N)
50+
#endif
4751

4852
#include "OGSwiftSupport.h"
4953
#include "OGTargetConditionals.h"

0 commit comments

Comments
 (0)