--- /dev/null
+--- amanda-2.4.1p1/common-src/statfs.c.tim Tue Jan 11 11:00:11 2000
++++ amanda-2.4.1p1/common-src/statfs.c Tue Jan 11 11:01:59 2000
+@@ -54,7 +54,7 @@
+ ** System V.4 (STATFS_SVR4)
+ */
+ # include <sys/statvfs.h>
+-# define STATFS_TYP "SVR4 (Irix-5, Solaris-2)"
++# define STATFS_TYP "SVR4 (Irix-5, Solaris-2, Linux glibc 2.1)"
+ # define STATFS_STRUCT struct statvfs
+ # define STATFS_TOTAL(buf) (buf).f_blocks
+ # define STATFS_AVAIL(buf) (buf).f_bavail
+@@ -62,7 +62,7 @@
+ # define STATFS_FILES(buf) (buf).f_files
+ # define STATFS_FAVAIL(buf) (buf).f_favail
+ # define STATFS_FFREE(buf) (buf).f_ffree
+-# define STATFS_SCALE(buf) (buf).f_frsize
++# define STATFS_SCALE(buf) ((buf).f_frsize?(buf).f_frsize:(buf).f_bsize)
+ # define STATFS(path, buffer) statvfs(path, &buffer)
+ # else
+ # if HAVE_SYS_VFS_H
+@@ -89,7 +89,7 @@
+ ** System V.3 (STATFS_SVR3)
+ */
+ # include <sys/statfs.h>
+-# define STATFS_TYP "SVR3 (Irix-3, Irix-4, Irix-6)"
++# define STATFS_TYP "SVR3 (Irix-3, Irix-4)"
+ # define STATFS_STRUCT struct statfs
+ # define STATFS_TOTAL(buf) (buf).f_blocks
+ # define STATFS_AVAIL(buf) (buf).f_bfree
--- /dev/null
+--- amanda-2.4.1p1/common-src/debug.c.tim2 Tue Jan 11 11:02:43 2000
++++ amanda-2.4.1p1/common-src/debug.c Tue Jan 11 11:04:36 2000
+@@ -42,7 +42,8 @@
+ static FILE *db_file = NULL;
+ #else
+ int db_fd = 2;
+- static FILE *db_file = stderr;
++ /* stderr cannot be assumed to be constant */
++ static FILE *db_file = NULL;
+ #endif
+
+ #ifndef DEBUG_DIR
+@@ -56,7 +57,10 @@
+ {
+ va_list argp;
+
+- if(db_fd == -1) return;
++ if(db_fd == NULL) {
++ if (db_fd == -1) return;
++ if (db_fd == 2) db_file = stderr;
++ }
+
+ arglist_start(argp, format);
+ vfprintf(db_file, format, argp);