Skip to content

Commit 42605c3

Browse files
Cfg on only the target libc.
1 parent 8ce7aa2 commit 42605c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/liblibc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4441,7 +4441,7 @@ pub mod funcs {
44414441
pub fn execvp(c: *const c_char,
44424442
argv: *mut *const c_char) -> c_int;
44434443
pub fn fork() -> pid_t;
4444-
#[cfg(all(not(target_os = "nacl"), not(target_libc = "newlib")))]
4444+
#[cfg(not(target_libc = "newlib"))]
44454445
pub fn fpathconf(filedes: c_int, name: c_int) -> c_long;
44464446
pub fn getcwd(buf: *mut c_char, size: size_t) -> *mut c_char;
44474447
pub fn getegid() -> gid_t;

src/libnative/io/addrinfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl GetAddrInfoRequest {
8787
}
8888
}
8989

90-
#[cfg(all(not(target_os = "nacl"), not(target_libc = "newlib")))]
90+
#[cfg(not(target_libc = "newlib"))]
9191
extern "system" {
9292
fn getaddrinfo(node: *const c_char, service: *const c_char,
9393
hints: *const libc::addrinfo,

src/libstd/sys/unix/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ pub fn chown(p: &Path, uid: int, gid: int) -> IoResult<()> {
256256
}
257257

258258
pub fn readlink(p: &Path) -> IoResult<Path> {
259-
#[cfg(all(not(target_os = "nacl"), not(target_libc = "newlib")))]
259+
#[cfg(not(target_libc = "newlib"))]
260260
fn pathconf(p: *mut libc::c_char) -> i64 {
261261
unsafe { libc::pathconf(p, libc::_PC_NAME_MAX) as i64 }
262262
}
263-
#[cfg(all(target_os = "nacl", target_libc = "newlib"))]
263+
#[cfg(target_libc = "newlib")]
264264
fn pathconf(_: *mut libc::c_char) -> i64 {
265265
unsafe { libc::sysconf(libc::_PC_NAME_MAX) as i64 }
266266
}

0 commit comments

Comments
 (0)