https://git.reactos.org/?p=reactos.git;a=commitdiff;h=567a5231d5a8b00327146…
commit 567a5231d5a8b00327146e651464ff4ef791013b
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Mon Nov 9 12:04:25 2020 +0100
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Mon Nov 16 16:58:10 2020 +0100
[NFS41_DRIVER] Use GNU89 standard when compiling with CLang.
---
drivers/filesystems/nfs/CMakeLists.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/filesystems/nfs/CMakeLists.txt
b/drivers/filesystems/nfs/CMakeLists.txt
index 9845ef76814..3d05ff676c6 100644
--- a/drivers/filesystems/nfs/CMakeLists.txt
+++ b/drivers/filesystems/nfs/CMakeLists.txt
@@ -14,10 +14,14 @@ set_module_type(nfs41_driver kernelmodedriver)
target_link_libraries(nfs41_driver ntoskrnl_vista rdbsslib rxce copysup memcmp
${PSEH_LIB})
add_importlibs(nfs41_driver ntoskrnl hal)
-if(USE_CLANG_CL OR (NOT MSVC))
+if(GCC OR CLANG)
target_compile_options(nfs41_driver PRIVATE "-Wno-switch")
- if(USE_CLANG_CL)
+ if(CLANG)
target_compile_options(nfs41_driver PRIVATE "-Wno-unused-value")
+ if(GCC)
+ # When CLang mimicks GCC, it uses C17 as default, which breaks __inline
+ target_compile_options(nfs41_driver PRIVATE "-std=gnu89")
+ endif()
endif()
endif()