Fixed compile errors, realoc was not declared...