tools: Add roken.h to afsdump
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 7 Apr 2012 12:26:25 +0000 (13:26 +0100)
committerDerrick Brashear <shadow@dementix.org>
Sat, 7 Apr 2012 13:23:21 +0000 (06:23 -0700)
On AIX, building afsdump currently produces the following warnings:

"afsdump_scan.c", line 34.10: 1506-296 (S) #include file <sys/fcntl.h> not found.
"afsdump_scan.c", line 275.32: 1506-045 (S) Undeclared identifier O_RDWR.
"afsdump_scan.c", line 275.41: 1506-045 (S) Undeclared identifier O_CREAT.
"afsdump_scan.c", line 275.51: 1506-045 (S) Undeclared identifier O_TRUNC.
"afsdump_scan.c", line 305.29: 1506-045 (S) Undeclared identifier O_RDONLY.

Rather than including more platform specific goo, just add a roken.h
include to the various files to pull in the necessary headers.

Change-Id: I46db92511c804cfc9b5d67b97cd3596480d306d6
Reviewed-on: http://gerrit.openafs.org/7117
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

src/tools/afsdump_dirlist.c
src/tools/afsdump_extract.c
src/tools/afsdump_scan.c
src/tools/afsdump_xsed.c

index 71cde8e..bb0d244 100644 (file)
 /* afsdump_dirlist.c - List an AFS directory file */
 
 #include <afsconfig.h>
+#include <afs/param.h>
 
-#include <sys/fcntl.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+#include <roken.h>
 
 #include <afs/stds.h>
 #include <afs/com_err.h>
index 9b25203..1be4014 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#include <sys/fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+#include <roken.h>
 
 #include <afs/com_err.h>
 #include <afs/cellconfig.h>
index 5fc2bda..7a2abfc 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#include <sys/fcntl.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+#include <roken.h>
 
 #include <afs/com_err.h>
 #include <afs/pterror.h>
index 3328e51..cd52086 100644 (file)
 /* UB - Unified Backups */
 /* methods/afs/dumpscan/afsdump_scan.c - General-purpose dump scanner */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
+#include <roken.h>
+
 #include "dumpscan.h"
-#include <sys/fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
 
 extern int opterr, optind;
 extern char *optarg;