]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
jfs: Rename _inline to avoid conflict with clang's '-fms-extensions'
authorNathan Chancellor <nathan@kernel.org>
Thu, 23 Oct 2025 17:38:50 +0000 (10:38 -0700)
committerNathan Chancellor <nathan@kernel.org>
Wed, 29 Oct 2025 23:22:21 +0000 (16:22 -0700)
commita6773e6932cbfbc0e123bc0529ea27f2a8abb833
tree3a27a33da306dfeb87fe40aeb3f71dbc78f6fef3
parent3a8660878839faadb4f1a6dd72c3179c1df56787
jfs: Rename _inline to avoid conflict with clang's '-fms-extensions'

Building fs/jfs with clang and '-fms-extensions' errors with:

  In file included from fs/jfs/jfs_unicode.c:8:
  fs/jfs/jfs_incore.h:86:13: error: type name does not allow function specifier to be specified
     86 |                                         unchar _inline[128];
        |                                                ^
  fs/jfs/jfs_incore.h:86:20: error: expected member name or ';' after declaration specifiers
     86 |                                         unchar _inline[128];
        |                                         ~~~~~~~~~~~~~~^

'-fms-extensions' in clang enables several other Microsoft specific
keywords such as _inline [1], presumably for compatibility with MSVC, as
Microsoft's documentation [2] mentions:

  For compatibility with previous versions, _inline and _forceinline are
  synonyms for __inline and __forceinline, respectively

Rename the _inline array in 'struct jfs_inode_info' to _inline_sym to
avoid this conflict, which is not a large workaround as this member is
only ever referred to via the i_inline macro.

Link: https://github.com/llvm/llvm-project/blob/249883d0c5883996bed038cd82a8999f342994c9/clang/include/clang/Basic/TokenKinds.def#L744-L79
Link: https://learn.microsoft.com/en-us/cpp/c-language/inline-functions
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Link: https://patch.msgid.link/20251023-jfs-fix-conflict-with-clang-ms-ext-v1-1-e219d59a1e68@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
fs/jfs/jfs_incore.h