fixed compilation errors in open.c