Skip to content

Commit 2b64a08

Browse files
author
Oleh Kulykov
committed
1722291742
1 parent 7ff94c1 commit 2b64a08

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ if (MINGW)
119119
add_definitions(-DLIBPLZMA_MINGW=1)
120120
message("MinGW")
121121

122-
# CXX ignore private external function attributes. Always link.
123-
check_cxx_compiler_flag("-Wno-attributes" WITH_WNO_ATTRIBUTES_CXX)
124-
if (WITH_WNO_ATTRIBUTES_CXX)
125-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
126-
endif()
122+
# CXX ignore private external function attributes or unknown scoped attributes.
123+
#check_cxx_compiler_flag("-Wno-attributes" WITH_WNO_ATTRIBUTES_CXX)
124+
#if (WITH_WNO_ATTRIBUTES_CXX)
125+
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
126+
#endif()
127127

128128
endif()
129129

src/plzma_private.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@
152152
# error "Configuration error: MinGW without posix."
153153
#endif
154154

155+
#if defined(LIBPLZMA_MINGW)
156+
# undef LIBPLZMA_C_API_PRIVATE
157+
# define LIBPLZMA_C_API_PRIVATE(RETURN_TYPE) LIBPLZMA_C_EXTERN LIBPLZMA_ATTRIB RETURN_TYPE
158+
#endif
159+
155160
#if defined(__GNUC__) || defined(__clang__)
156161
# define LIBPLZMA_PACKED_ALIGNED_START(ALIGN)
157162
# define LIBPLZMA_PACKED_ALIGNED_END(ALIGN) __attribute__((packed, aligned(ALIGN)))

0 commit comments

Comments
 (0)