[OpenAFS] fstat vs stat in 1.3.82

Tony D'Amato tony@lions.odu.edu
Fri, 10 Jun 2005 10:00:15 -0400


I'm compiling OpenAFS 1.3.82 on SGI IRIX 6.5.22 using the SGI MIPSpro
7.3.1.3m compilers, and I've run into a few syntax errors. Here's a
small part of one of them - I replaced fstat with stat in a couple of
modules because the compiler complained. Here's the patch.

I've got some other patches which I made to allow OpenAFS to compile
under IRIX - where's a good place to send these?

Thanks!
-- 
Tony D'Amato
Senior UNIX Systems Administrator
Office of Computing and Communcations Services


--- openafs-1.3.82/src/bozo/bosserver.c.orig    2005-04-26 21:37:04.000000000 -0400
+++ openafs-1.3.82/src/bozo/bosserver.c
@@ -870,7 +870,7 @@ main(int argc, char **argv, char **envp)

     if ((!DoSyslog)
 #ifndef AFS_NT40_ENV
-       && (!(fstat(AFSDIR_BOZLOG_FILE, &sb) == 0) &&
+       && (!(stat(AFSDIR_BOZLOG_FILE, &sb) == 0) &&
        (S_ISFIFO(sb.st_mode)))
 #endif
        ) {
--- openafs-1.3.82/src/util/serverLog.c.orig    2005-04-19 01:14:40.000000000 -0400
+++ openafs-1.3.82/src/util/serverLog.c
@@ -241,7 +241,7 @@ OpenLog(const char *fileName)
     }

     /* Support named pipes as logs by not rotating them */
-    if ((fstat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
+    if ((stat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
        isfifo = 1;
     }
 #endif
@@ -314,7 +314,7 @@ ReOpenLog(const char *fileName)
     }

     /* Support named pipes as logs by not rotating them */
-    if ((fstat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
+    if ((stat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
        isfifo = 1;
     }
 #endif