Skip to content

Instantly share code, notes, and snippets.

@sathlan
Forked from anonymous/patch-main.c
Last active December 26, 2015 04:39
Show Gist options
  • Save sathlan/7094910 to your computer and use it in GitHub Desktop.
Save sathlan/7094910 to your computer and use it in GitHub Desktop.
--- main.c.orig
+++ main.c
@@ -833,7 +833,12 @@ main(int argc, char **argv, char **envp)
mySignal(SIGPIPE, SigPipe);
#endif
+#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2
+ orig_GC_warn_proc = GC_get_warn_proc();
+ GC_set_warn_proc(wrap_GC_warn_proc);
+#else
orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+#endif
err_msg = Strnew();
if (load_argc == 0) {
/* no URL specified */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment