WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
247156
[WinCairo][32bit] wtf/ByteOrder.h(56): error C2373: 'ntohs': redefinition; different type modifiers
https://bugs.webkit.org/show_bug.cgi?id=247156
Summary
[WinCairo][32bit] wtf/ByteOrder.h(56): error C2373: 'ntohs': redefinition; di...
Fujii Hironori
Reported
2022-10-27 17:10:57 PDT
[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
Comment 1
2023-11-27 01:20:33 PST
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]
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug