Commit af1e659
committed
fix _FORTIFY_SOURCE build: include limits.h before stdlib.h
`limits.h` must be included before `stdlib.h` when building with glibc and
having `_FORTIFY_SOURCE` set to a non-zero value.
When building with `_FORTIFY_SOURCE`, `realpath()` is inlined, and its
definition depends on whether `limits.h` has been included or not (clearly,
this is a terrible idea in terms of interacting with Clang modules and should
probably be fixed upstream). If the definition differs from the one in
SwiftGlibc, then _TestingInternals will not build.
glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=305161 parent 072692c commit af1e659
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
0 commit comments