Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ext/heapify/heapify.ml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ let default_heapify (f : file) =
let free_fun = emptyFunction "free" in
let alloc_exp = (Lval((Var(alloc_fun.svar)),NoOffset)) in
let free_exp = (Lval((Var(free_fun.svar)),NoOffset)) in
f.globals <- GText("#include <stdlib.h>\n") :: f.globals ;
ignore (heapify f alloc_exp free_exp)

(* StackGuard clone *)
Expand Down Expand Up @@ -195,7 +196,9 @@ let default_stackguard (f : file) =
let get_ra = expify (emptyFunction "stackguard_get_ra") in
let set_ra = expify (emptyFunction "stackguard_set_ra") in
let global_decl =
"extern void * stackguard_get_ra();
"#include <stdlib.h>

extern void * stackguard_get_ra();
extern void stackguard_set_ra(void *new_ra);
/* You must provide an implementation for functions that get and set the
* return address. Such code is unfortunately architecture specific.
Expand Down