Skip to content

Commit

Permalink
Fixes #204 with support for compiling with -fvisibility=hidden (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmeeker authored Jan 19, 2023
1 parent 6ceb5d2 commit 217a177
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/inc/platform/icd_test_log.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#ifndef _ICD_TEST_LOG_H_
#define _ICD_TEST_LOG_H_

#if defined (_WIN32)
#define DllExport __declspec( dllexport )
#if defined(_WIN32) || defined(__CYGWIN__)
#define DllExport __declspec(dllexport)
#else
#define DllExport
#ifndef __has_attribute
#define __has_attribute(x) 0 // Compatibility with non-clang compilers.
#endif
#if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\
(defined(__clang__) && __has_attribute(visibility))
#define DllExport __attribute__((visibility("default")))
#else
#define DllExport
#endif
#endif

DllExport int test_icd_initialize_app_log(void);
Expand Down

0 comments on commit 217a177

Please sign in to comment.