From 6e635c64061dfc35b8178810bdd5bfc5452b9d28 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 5 Nov 2019 02:16:15 +1100 Subject: [PATCH] std: close is OSX specific --- lib/std/c.zig | 1 - lib/std/c/darwin.zig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/c.zig b/lib/std/c.zig index 71e111a61d..ee19ef73c3 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -61,7 +61,6 @@ pub extern "c" fn abort() noreturn; pub extern "c" fn exit(code: c_int) noreturn; pub extern "c" fn isatty(fd: fd_t) c_int; pub extern "c" fn close(fd: fd_t) c_int; -pub extern "c" fn @"close$NOCANCEL"(fd: fd_t) c_int; pub extern "c" fn fstat(fd: fd_t, buf: *Stat) c_int; pub extern "c" fn @"fstat$INODE64"(fd: fd_t, buf: *Stat) c_int; pub extern "c" fn lseek(fd: fd_t, offset: off_t, whence: c_int) off_t; diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig index 391939aba7..f3cd77ec6f 100644 --- a/lib/std/c/darwin.zig +++ b/lib/std/c/darwin.zig @@ -46,6 +46,7 @@ pub const mach_header = macho.mach_header; pub const _errno = __error; +pub extern "c" fn @"close$NOCANCEL"(fd: fd_t) c_int; pub extern "c" fn mach_host_self() mach_port_t; pub extern "c" fn clock_get_time(clock_serv: clock_serv_t, cur_time: *mach_timespec_t) kern_return_t; pub extern "c" fn host_get_clock_service(host: host_t, clock_id: clock_id_t, clock_serv: ?[*]clock_serv_t) kern_return_t;