Skip to content

[sdl2] Fix wasm32-emscripten declaration-after-statement error#23678

Merged
BillyONeal merged 1 commit intomicrosoft:masterfrom
bwrsandman:sdl2-emscripten-c99
Mar 22, 2022
Merged

[sdl2] Fix wasm32-emscripten declaration-after-statement error#23678
BillyONeal merged 1 commit intomicrosoft:masterfrom
bwrsandman:sdl2-emscripten-c99

Conversation

@bwrsandman
Copy link
Copy Markdown
Contributor

Describe the pull request

  • What does your PR fix?

    Fixes building sdl2 with emscripten with patch from SDL2 dev branch
vcpkg/buildtrees/sdl2/src/ase-2.0.20-4d7f28b96f/src/timer/unix/SDL_systimer.c:197:9: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
    int was_error;
        ^
1 error generated.
  • Does your PR follow the maintainer guide?

    Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    Yes

@bwrsandman bwrsandman changed the title sdl2: Fix Emscripten declaration-after-statement error sdl2: Fix wasm32-emscripten declaration-after-statement error Mar 20, 2022
@bwrsandman bwrsandman mentioned this pull request Mar 21, 2022
17 tasks
@bwrsandman bwrsandman force-pushed the sdl2-emscripten-c99 branch from d96dfd7 to 5536259 Compare March 21, 2022 01:51
@LilyWangLL LilyWangLL changed the title sdl2: Fix wasm32-emscripten declaration-after-statement error [sdl2] Fix wasm32-emscripten declaration-after-statement error Mar 21, 2022
@LilyWangLL LilyWangLL added the category:port-bug The issue is with a library, which is something the port should already support label Mar 21, 2022
@LilyWangLL LilyWangLL added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Mar 21, 2022
Comment thread ports/sdl2/portfile.cmake
0004-Define-crt-macros.patch
0005-Fix-uwp-joystick.patch
0006-Update-SDL_sysurl.cpp.patch
0007-timer-Fix-Emscripten-declaration-after-statement-err.patch
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libsdl-org/SDL@99af328

This has been applied upstream.

@BillyONeal BillyONeal merged commit 6b6a353 into microsoft:master Mar 22, 2022
@BillyONeal
Copy link
Copy Markdown
Member

Thanks for the fix :)

@bwrsandman bwrsandman deleted the sdl2-emscripten-c99 branch March 22, 2022 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-bug The issue is with a library, which is something the port should already support info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants