vfsck: Fix roken fallout
[openafs.git] / src / vfsck / utilities.c
index 67f7cd4..353f532 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#ifdef AFS_HPUX_ENV
+/* We need the old directory type headers (included below), so don't include
+ * the normal dirent.h, or it will conflict. */
+# undef HAVE_DIRENT_H
+# include <sys/inode.h>
+# define       LONGFILENAMES   1
+# include <sys/sysmacros.h>
+# include <sys/ino.h>
+# include <sys/signal.h>
+# define       DIRSIZ_MACRO
+# ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
+#  include </usr/old/usr/include/ndir.h>
+# else
+#  include <ndir.h>
+# endif
+#endif
+
 #include <roken.h>
 
 #include <ctype.h>
 #endif
 #else /* AFS_VFSINCL_ENV */
 #include <sys/inode.h>
-#ifdef AFS_HPUX_ENV
-#define        LONGFILENAMES   1
-#include <sys/sysmacros.h>
-#include <sys/ino.h>
-#include <sys/signal.h>
-#define        DIRSIZ_MACRO
-#ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
-#include </usr/old/usr/include/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#else
+#ifndef        AFS_HPUX_ENV
 #include <sys/dir.h>
 #endif
 #include <sys/fs.h>
@@ -81,7 +87,6 @@ long diskreads, totalreads;   /* Disk cache statistics */
 #if    !defined(AFS_HPUX101_ENV)
 long lseek();
 #endif
-char *malloc();
 #if    defined(AFS_SUN_ENV)
 extern int iscorrupt;
 #endif