[REISERFS]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 25 Feb 2017 10:16:33 +0000 (10:16 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 25 Feb 2017 10:16:33 +0000 (10:16 +0000)
When compiling the driver with GCC, define __GCC__.
Fix defines accordingly.

CORE-12826

svn path=/trunk/; revision=73901

reactos/drivers/filesystems/reiserfs/CMakeLists.txt
reactos/drivers/filesystems/reiserfs/inc/linux/reiserfs_fs.h
reactos/drivers/filesystems/reiserfs/inc/reiserfs.h

index 4ec66cf..16dfc89 100644 (file)
@@ -81,7 +81,7 @@ add_library(reiserfs SHARED ${SOURCE} src/rfsd.rc)
 if(NOT MSVC)
     add_target_compile_flags(reiserfs "-Wno-pointer-sign -Wno-unused-function")
     if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
-        add_target_compile_flags(reiserfs "-Wno-unused-but-set-variable -Wno-unused-variable -Wno-missing-braces")
+        add_target_compile_flags(reiserfs "-Wno-unused-but-set-variable -Wno-unused-variable -Wno-missing-braces -D__GCC__")
     endif()
 else()
     #disable warnings: "unreferenced local variable", "initialized, but not used variable", "benign include"
index dd5bd16..0c59d3e 100644 (file)
@@ -3,7 +3,11 @@
  */
 
 #ifdef __GCC__
+#ifndef __REACTOS__
  #define __PACKED              __PACKED
+#else
+ #define __PACKED              __attribute__((packed))
+#endif
 #else
  #define __PACKED              
 #endif
index cc84dbb..85a1a78 100644 (file)
@@ -4,7 +4,11 @@
 #include <linux/types.h>
 
 #ifdef __GCC__
+#ifndef __REACTOS__
  #define __PACKED              __PACKED
+#else
+ #define __PACKED              __attribute__((packed))
+#endif
 #else
  #define __PACKED              
 #endif