File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h
2
+ index 88b05ef723c..214bca1ee17 100644
3
+ --- a/gdb/common/common-defs.h
4
+ +++ b/gdb/common/common-defs.h
5
+ @@ -66,9 +66,13 @@
6
+ plus this seems like a reasonable safety measure. The check for
7
+ optimization is required because _FORTIFY_SOURCE only works when
8
+ optimization is enabled. If _FORTIFY_SOURCE is already defined,
9
+ - then we don't do anything. */
10
+ + then we don't do anything. Also, on MinGW, fortify requires
11
+ + linking to -lssp, and to avoid the hassle of checking for
12
+ + that and linking to it statically, we just don't define
13
+ + _FORTIFY_SOURCE there. */
14
+
15
+ - #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
16
+ + #if (!defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 \
17
+ + && !defined(__MINGW32__))
18
+ #define _FORTIFY_SOURCE 2
19
+ #endif
You can’t perform that action at this time.
0 commit comments