Skip to content

Commit

Permalink
Merge pull request #1972 from bansan85/v1.x
Browse files Browse the repository at this point in the history
Fix runtime when build with -fsanitize=cfi
  • Loading branch information
gabime authored Nov 25, 2021
2 parents 2ab86a4 + 58e2b45 commit c6d144d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions include/spdlog/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@

#ifdef SPDLOG_COMPILED_LIB
# undef SPDLOG_HEADER_ONLY
# if defined(_WIN32) && defined(SPDLOG_SHARED_LIB)
# ifdef spdlog_EXPORTS
# define SPDLOG_API __declspec(dllexport)
# else
# define SPDLOG_API __declspec(dllimport)
# if defined(SPDLOG_SHARED_LIB)
# if defined(_WIN32)
# ifdef spdlog_EXPORTS
# define SPDLOG_API __declspec(dllexport)
# else // !spdlog_EXPORTS
# define SPDLOG_API __declspec(dllimport)
# endif
# else // !defined(_WIN32)
# define SPDLOG_API __attribute__((visibility ("default")))
# endif
# else // !defined(_WIN32) || !defined(SPDLOG_SHARED_LIB)
# else // !defined(SPDLOG_SHARED_LIB)
# define SPDLOG_API
# endif
# define SPDLOG_INLINE
Expand Down
2 changes: 1 addition & 1 deletion include/spdlog/sinks/base_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace spdlog {
namespace sinks {
template<typename Mutex>
class base_sink : public sink
class SPDLOG_API base_sink : public sink
{
public:
base_sink();
Expand Down

0 comments on commit c6d144d

Please sign in to comment.