Skip to content

Commit e577fb6

Browse files
committed
Add MacOS support
1 parent 55f581f commit e577fb6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ pub extern fn libdiffuzz_init_config() {
2828
CONF_ALLOC_EXTRA_MEM.store(alloc_extra_mem, atomic::Ordering::Relaxed);
2929
}
3030

31-
#[link_section = ".ctors"]
31+
#[cfg_attr(target_os = "macos", link_section = "__DATA,__mod_init_func")]
32+
#[cfg_attr(not(target_os = "macos"), link_section = ".ctors")]
3233
pub static CONSTRUCTOR: extern fn() = libdiffuzz_init_config;
3334

3435
/// Gets then increments MEM_INIT

0 commit comments

Comments
 (0)