Patchwork [libgcc,committed] : Fix missing include of windows.h for mingw targets

login
register
mail settings
Submitter Kai Tietz
Date June 9, 2011, 9:10 p.m.
Message ID <BANLkTimh=zOR=wgiUk498TSa9eo58gu5SQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/99814/
State New
Headers show

Comments

Kai Tietz - June 9, 2011, 9:10 p.m.
Hello,

by recent changes about HAVE_ENABLE_EXECUTE_STACK and moving code into
libgcc2.c the necessary header include of windows.h was removed for
config/i386/mingw32.h for LIBGCC2 case.  This header is necessary for
trampoline code in libgcc2.c, as for mingw target platform API is
used.

ChangeLog

        * libgcc2.c (L_trampoline): Include windows.h for mingw targets.

Patch tested and applied at  revision 174860.

Regards,
Kai

Patch

Index: libgcc2.c
===================================================================
--- libgcc2.c   (revision 174854)
+++ libgcc2.c   (working copy)
@@ -2032,6 +2032,7 @@ 
 /* Jump to a trampoline, loading the static chain address.  */

 #if defined(WINNT) && ! defined(__CYGWIN__)
+#include <windows.h>
 int getpagesize (void);
 int mprotect (char *,int, int);