diff --git a/rustler_sys/build.rs b/rustler_sys/build.rs index 224e62d8..f7720d08 100644 --- a/rustler_sys/build.rs +++ b/rustler_sys/build.rs @@ -139,7 +139,7 @@ impl<'a> ApiBuilder for WinForwardersApiBuilder<'a> { ) .unwrap(); writeln!(self.0, "#[inline]").unwrap(); - writeln!(self.0, "pub unsafe fn {}({})", name, args).unwrap(); + writeln!(self.0, "pub unsafe extern \"C\" fn {}({})", name, args).unwrap(); write_ret(self.0, ret); writeln!(self.0, "{{").unwrap(); writeln!(