Skip to content

Commit 73817ec

Browse files
committed
fix(zlib): define _POSIX_C_SOURCE=200112L
This follows upstream's change in madler/zlib@1382e6611 due to EWOULDBLOCK is used since madler/zlib@81cc0bebe and `-D_POSIX_SOURCE` would hide `#define EWOULDBLOCK EAGAIN`. See <https://github.com/freebsd/freebsd-src/blob/3e9f4fd6fc50300d052d5619d82a14d3488483d5/sys/sys/errno.h#L92-L93> Actually I feel like _POSIX_C_SOURCE=200112L maybe redundant though let's just do whatever upstream does This was found in * <rust-lang/rust#154734> * <https://triage.rust-lang.org/gha-logs/rust-lang/rust/69786578177>
1 parent 232b03a commit 73817ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fn build_zlib(cfg: &mut cc::Build, target: &str) {
135135

136136
if !target.contains("windows") {
137137
cfg.define("_LARGEFILE64_SOURCE", None);
138-
cfg.define("_POSIX_SOURCE", None);
138+
cfg.define("_POSIX_C_SOURCE", "200112L");
139139
cfg.flag("-fvisibility=hidden");
140140
}
141141
if target.contains("apple") {

0 commit comments

Comments
 (0)