diff --git a/src/header/glob/mod.rs b/src/header/glob/mod.rs index 66f3f5d66a..0041fe2f61 100644 --- a/src/header/glob/mod.rs +++ b/src/header/glob/mod.rs @@ -41,6 +41,7 @@ pub const GLOB_ABORTED: c_int = 2; // Pattern does not match any existing pathname, and GLOB_NOCHECK was not set pub const GLOB_NOMATCH: c_int = 3; +#[linkage = "weak"] // GNU prefers its own glob e.g. in Make #[repr(C)] #[derive(Debug)] pub struct glob_t { @@ -52,6 +53,7 @@ pub struct glob_t { __opaque: *mut c_void, // Vec<*mut c_char> } +#[linkage = "weak"] // GNU prefers its own glob e.g. in Make #[no_mangle] pub unsafe extern "C" fn glob( pattern: *const c_char, @@ -145,6 +147,7 @@ pub unsafe extern "C" fn glob( 0 } +#[linkage = "weak"] // GNU prefers its own glob e.g. in Make #[no_mangle] pub unsafe extern "C" fn globfree(pglob: *mut glob_t) { // Retake ownership