Bug 247156
Summary: | [WinCairo][32bit] wtf/ByteOrder.h(56): error C2373: 'ntohs': redefinition; different type modifiers | ||
---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> |
Component: | Web Template Framework | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | 75188585 |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Fujii Hironori
[WinCairo][32bit] wtf/ByteOrder.h(56): error C2373: 'ntohs': redefinition; different type modifiers
"perl .\Tools\Scripts\build-webkit --wincairo --32-bit" reports the following compilation error.
> C:\home\webkit\gc\WebKitBuild\Release\WTF\Headers\wtf/ByteOrder.h(56): error C2373: 'ntohs': redefinition; different type modifiers
> C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winsock2.h(1985): note: see declaration of 'ntohs'
> C:\home\webkit\gc\WebKitBuild\Release\WTF\Headers\wtf/ByteOrder.h(56): error C2491: 'ntohs': definition of dllimport function not allowed
> C:\home\webkit\gc\WebKitBuild\Release\WTF\Headers\wtf/ByteOrder.h(57): error C2373: 'htons': redefinition; different type modifiers
> C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winsock2.h(1813): note: see declaration of 'htons'
> C:\home\webkit\gc\WebKitBuild\Release\WTF\Headers\wtf/ByteOrder.h(57): error C2491: 'htons': definition of dllimport function not allowed
JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.h has #include <winsock2.h>.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
June
I also encountered this problem. I downloaded the 'WebKitRequirementsWin32.zip' manually, and using camke and msbuild like below:
1. cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DCMAKE_BUILD_TYPE=Release -DRUBY_LIBRARY=C:\tools\ruby26\lib -DPORT="WinCairo" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSHOW_BINDINGS_GENERATION_PROGRESS=1 -DDEVELOPER_MODE=ON -DENABLE_EXPERIMENTAL_FEATURES=ON .. 2>&1
2. msbuild /p:Platform=Win32 /p:Configuration=Release WebKit.sln /t:Rebuild 2>&1
error log:
F:\gitP\WebKit\webkit\build_x86_WinCairo\WTF\Headers\wtf/ByteOrder.h(56,17): error C2373: 'ntohs': redefinition; different type modifiers (compiling source file F:\gitP\WebKit\webkit\build_x86_WinCairo\JavaScriptCore\DerivedSources\unified-sources\UnifiedSource-84c9f43f-6.cpp) [F:\gitP\WebKit\webkit\build_x86_WinCairo\Source\JavaScriptCore\JavaScriptCore.vcxproj]
F:\gitP\WebKit\webkit\build_x86_WinCairo\WTF\Headers\wtf/ByteOrder.h(56,17): error C2491: 'ntohs': definition of dllimport function not allowed (compiling source file F:\gitP\WebKit\webkit\build_x86_WinCairo\JavaScriptCore\DerivedSources\unified-sources\UnifiedSource-84c9f43f-6.cpp) [F:\gitP\WebKit\webkit\build_x86_WinCairo\Source\JavaScriptCore\JavaScriptCore.vcxproj]
F:\gitP\WebKit\webkit\build_x86_WinCairo\WTF\Headers\wtf/ByteOrder.h(57,17): error C2373: 'htons': redefinition; different type modifiers (compiling source file F:\gitP\WebKit\webkit\build_x86_WinCairo\JavaScriptCore\DerivedSources\unified-sources\UnifiedSource-84c9f43f-6.cpp) [F:\gitP\WebKit\webkit\build_x86_WinCairo\Source\JavaScriptCore\JavaScriptCore.vcxproj]
F:\gitP\WebKit\webkit\build_x86_WinCairo\WTF\Headers\wtf/ByteOrder.h(57,17): error C2491: 'htons': definition of dllimport function not allowed (compiling source file F:\gitP\WebKit\webkit\build_x86_WinCairo\JavaScriptCore\DerivedSources\unified-sources\UnifiedSource-84c9f43f-6.cpp) [F:\gitP\WebKit\webkit\build_x86_WinCairo\Source\JavaScriptCore\JavaScriptCore.vcxproj]