fixed compilation errors in linked.c