Skip to content

Commit

Permalink
fix: broken compiler guard
Browse files Browse the repository at this point in the history
instead use the more portable `gnu::retain` c++ attribute
  • Loading branch information
oberrich authored Jun 7, 2024
1 parent 8fde6fc commit f47e37d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/inline_syscall.inl
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@

#if defined(_MSC_VER)
#define JM_INLINE_SYSCALL_FORCEINLINE __forceinline
#define JM_INLINE_SYSCALL_RETAIN
#else
#define JM_INLINE_SYSCALL_FORCEINLINE __attribute__((always_inline))
#define JM_INLINE_SYSCALL_RETAIN __attribute__((retain))
#endif

// helper macro to reduce the typing a bit
Expand Down Expand Up @@ -60,7 +58,7 @@ namespace jm {
template<std::uint32_t Hash>
struct syscall_holder {
[[gnu::section(
"_sysc")]] JM_INLINE_SYSCALL_RETAIN inline static JM_INLINE_SYSCALL_ENTRY_TYPE entry{ Hash };
"_sysc"), gnu::retain]] inline static JM_INLINE_SYSCALL_ENTRY_TYPE entry{ Hash };
};

// we instantiate the first entry with 0 hash to be able to get a pointer
Expand Down

0 comments on commit f47e37d

Please sign in to comment.