pull-prototypes-to-head-20020821
[openafs.git] / src / budb / db_alloc.c
index 59f8a7f..09484d3 100644 (file)
@@ -17,6 +17,13 @@ RCSID("$Header$");
 #else
 #include <netinet/in.h>
 #endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <sys/types.h>
 #include <afs/stds.h>
 #include <ubik.h>
@@ -41,10 +48,10 @@ afs_int32 InitDBalloc ()
     nEntries[tape_BLOCK] = NtapeS;
     nEntries[dump_BLOCK] = NdumpS;
 
-    sizeEntries[volFragment_BLOCK] = sizeof(((struct vfBlock *)0)->a[0]);
-    sizeEntries[volInfo_BLOCK] = sizeof(((struct viBlock *)0)->a[0]);
-    sizeEntries[tape_BLOCK] = sizeof(((struct tBlock *)0)->a[0]);
-    sizeEntries[dump_BLOCK] = sizeof(((struct dBlock *)0)->a[0]);
+    sizeEntries[volFragment_BLOCK] = sizeof(((struct vfBlock *)NULL)->a[0]);
+    sizeEntries[volInfo_BLOCK] = sizeof(((struct viBlock *)NULL)->a[0]);
+    sizeEntries[tape_BLOCK] = sizeof(((struct tBlock *)NULL)->a[0]);
+    sizeEntries[dump_BLOCK] = sizeof(((struct dBlock *)NULL)->a[0]);
 
     return 0;
 }