Skip to content

Commit 48b4b1f

Browse files
committed
errfunc ptr is nullable, so use Option as part of interface to glob (#7752).
1 parent 7e80981 commit 48b4b1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/libc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3226,11 +3226,12 @@ pub mod funcs {
32263226
pub mod glob {
32273227
use libc::types::os::arch::c95::{c_char, c_int};
32283228
use libc::types::os::common::posix01::{glob_t};
3229+
use option::Option;
32293230

32303231
extern {
32313232
pub fn glob(pattern: *c_char,
32323233
flags: c_int,
3233-
errfunc: extern "C" fn(epath: *c_char, errno: int) -> int,
3234+
errfunc: Option<extern "C" fn(epath: *c_char, errno: int) -> int>,
32343235
pglob: *mut glob_t);
32353236
pub fn globfree(pglob: *mut glob_t);
32363237
}

0 commit comments

Comments
 (0)