Skip to content

Commit f950450

Browse files
committed
On WIN32, fix compile errors on non MSVC compilers
1 parent e14acb9 commit f950450

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/libFLAC/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ if(FLAC__CPU_X86_64 OR FLAC__CPU_IA32)
2121
if(WITH_AVX AND MSVC)
2222
set_source_files_properties(fixed_intrin_avx2.c lpc_intrin_avx2.c stream_encoder_intrin_avx2.c lpc_intrin_fma.c PROPERTIES COMPILE_FLAGS /arch:AVX2)
2323
endif()
24+
if(WITH_AVX AND WIN32 AND NOT MSVC)
25+
set_source_files_properties(fixed_intrin_avx2.c lpc_intrin_avx2.c stream_encoder_intrin_avx2.c lpc_intrin_fma.c PROPERTIES COMPILE_FLAGS -mavx2)
26+
endif()
2427
else()
2528
check_cpu_arch_arm64(FLAC__CPU_ARM64)
2629
if(FLAC__CPU_ARM64)

src/share/getopt/getopt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static char *posixly_correct;
221221
/* Avoid depending on library functions or files
222222
whose names are inconsistent. */
223223

224-
#ifndef getenv
224+
#if !defined(getenv) && !(defined(__clang__) && defined(_MSC_VER))
225225
extern char *getenv (const char * name);
226226
#endif
227227

0 commit comments

Comments
 (0)