Skip to content

Commit 181a3b9

Browse files
committed
feat: add c99 mode in build.rs for issue BurntSushi#33
1 parent 5c5d720 commit 181a3b9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pcre2-sys/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ fn main() {
8585
{
8686
builder.debug(true);
8787
}
88+
// We enable C99 mode when compiling PCRE2. Because without it, build errors
89+
// have been observed in some environments. It's not totally clear why this
90+
// only occurs in some environments, but one possible guess is that this
91+
// supports older compilers. Either way, there is still some uncertainty
92+
// about why enabling this flag is necessary. See #33 for more details.
93+
builder.flag("-std=c99");
8894
builder.compile("libpcre2.a");
8995
}
9096

0 commit comments

Comments
 (0)