We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3388 - Fail to build src/thread/windows/SDL_systhread.c on MinGW 4.9.3
Summary: Fail to build src/thread/windows/SDL_systhread.c on MinGW 4.9.3
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: thread (show other bugs)
Version: HG 2.1
Hardware: x86_64 Windows 7
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-09 12:22 UTC by Vitaly Novichkov
Modified: 2016-10-01 17:09 UTC (History)
0 users

See Also:


Attachments
Patch which fixes build on MinGW (547 bytes, patch)
2016-07-09 12:22 UTC, Vitaly Novichkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Novichkov 2016-07-09 12:22:12 UTC
Created attachment 2530 [details]
Patch which fixes build on MinGW

Line 124
====================================================================
const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0;
====================================================================

Error of compiler:
====================================================================
  CC     build/SDL_systhread.lo
src/thread/windows/SDL_systhread.c: In function 'SDL_SYS_CreateThread':
src/thread/windows/SDL_systhread.c:124:45: error: 'STACK_SIZE_PARAM_IS_A_RESERVA
TION' undeclared (first use in this function)
     const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION :
 0;
                                             ^
src/thread/windows/SDL_systhread.c:124:45: note: each undeclared identifier is r
eported only once for each function it appears in
make: *** [build/SDL_systhread.lo] Error 1
====================================================================

Fixing when I adding into begin of the file:
====================================================================
#ifndef STACK_SIZE_PARAM_IS_A_RESERVATION
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
#endif
====================================================================
Comment 1 Vitaly Novichkov 2016-07-09 12:32:28 UTC
P.S. Sources are most fresh, got just now (07/09/2016, 09.07.2016, 2016-07-09)
Comment 2 Sam Lantinga 2016-10-01 17:09:24 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/1122571639b6