After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727539 - libgupnp: Include <windows.h> on Windows for GetVersionEx() function
libgupnp: Include <windows.h> on Windows for GetVersionEx() function
Status: RESOLVED FIXED
Product: GUPnP
Classification: Other
Component: gupnp
unspecified
Other All
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-03 12:42 UTC by Philip Withnall
Modified: 2014-04-04 07:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libgupnp: Include <windows.h> on Windows for GetVersionEx() function (852 bytes, patch)
2014-04-03 12:42 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-04-03 12:42:49 UTC
Here’s a patch from Luciana Fujii to include <windows.h> when building against Windows, so that we have access to the declaration of GetVersionEx().
Comment 1 Philip Withnall 2014-04-03 12:42:52 UTC
Created attachment 273523 [details] [review]
libgupnp: Include <windows.h> on Windows for GetVersionEx() function

The <windows.h> header is needed for the declaration of GetVersionEx()
and related structures.
Comment 2 Jens Georg 2014-04-03 14:16:09 UTC
Review of attachment 273523 [details] [review]:

Weird. Worked fine on mingw last week
Comment 3 Philip Withnall 2014-04-03 14:29:49 UTC
(In reply to comment #2)
> Weird. Worked fine on mingw last week

Mmm. I’m building with a recent MinGW in a Windows 7 64-bit VM, and it definitely fails without the patch (throwing the usual errors about GetVersionEx not being defined, etc.); with the patch it works fine.

I don’t know much about MinGW; I guess it could be caused by your version of MinGW including that header somewhere in the header dependency tree of gupnp-context.c, or some other dependency which I don’t have including it?
Comment 4 Jens Georg 2014-04-03 17:03:08 UTC
Review of attachment 273523 [details] [review]:

Forgot to set status
Comment 5 Jens Georg 2014-04-03 17:04:18 UTC
Ah, there's this weird subtle differences of mingw-w64 and mingw, maybe that's the cause. Anyway, including it shouldn't hurt.
Comment 6 Philip Withnall 2014-04-04 07:09:14 UTC
Attachment 273523 [details] pushed as c67e2f6 - libgupnp: Include <windows.h> on Windows for GetVersionEx() function