=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/co.c,v retrieving revision 1.114 retrieving revision 1.115 diff -c -r1.114 -r1.115 *** src/usr.bin/rcs/co.c 2010/09/08 15:15:50 1.114 --- src/usr.bin/rcs/co.c 2010/10/20 19:53:53 1.115 *************** *** 1,4 **** ! /* $OpenBSD: co.c,v 1.114 2010/09/08 15:15:50 tobias Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: co.c,v 1.115 2010/10/20 19:53:53 tobias Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. *************** *** 366,373 **** /* * File inherits permissions from its ,v file */ ! if (file->rf_fd != -1) { ! if (fstat(file->rf_fd, &st) == -1) err(1, "%s", file->rf_path); file->rf_mode = mode = st.st_mode; } else { --- 366,373 ---- /* * File inherits permissions from its ,v file */ ! if (file->rf_file != NULL) { ! if (fstat(fileno(file->rf_file), &st) == -1) err(1, "%s", file->rf_path); file->rf_mode = mode = st.st_mode; } else {