[bug #4302] errno is not always an extern int
[mmh] / sbr / context_read.c
index e6cdfff..3084ff5 100644 (file)
@@ -28,8 +28,6 @@
 #include <errno.h>                             /* system call errors */
 #include <pwd.h>                               /* structure for getpwuid() results */
 
-extern int     errno;                          /* system call error number */
-
 void
 context_read (void)
 {
@@ -124,9 +122,9 @@ context_read (void)
 
     ctxpath = getcpy (m_maildir (cp));
 
-    if ((ib = fopen (ctxpath, "r"))) {
+    if ((ib = lkfopen (ctxpath, "r"))) {
        readconfig ((struct node **) 0, ib, cp, 1);
-       fclose (ib);
+       lkfclose (ib, ctxpath);
     }
 
     return;