]> git.wh0rd.org - dump.git/blobdiff - common/dumprmt.c
Check for the e2fsprogs header <ext2fs/ext2_fs.h> instead of the kernel header if...
[dump.git] / common / dumprmt.c
index 31eb63fc8b550ccd27202848398d834e9d6181f9..12d60fca7408197dc3bec5d363e85d68a484ec0a 100644 (file)
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: dumprmt.c,v 1.15 2000/12/21 11:14:53 stelian Exp $";
+       "$Id: dumprmt.c,v 1.17 2001/06/18 10:58:28 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
-#ifdef __linux__
-#include <sys/types.h>
-#include <linux/types.h>
-#endif
 #include <sys/param.h>
 #include <sys/mtio.h>
 #include <sys/socket.h>
 #include <sys/time.h>
 #ifdef __linux__
+#include <sys/types.h>
+#ifdef HAVE_EXT2FS_EXT2_FS_H
+#include <ext2fs/ext2_fs.h>
+#else
 #include <linux/ext2_fs.h>
+#endif
 #include <bsdcompat.h>
 #include <signal.h>
-#else
-#ifdef sunos
+#elif defined sunos
 #include <sys/vnode.h>
 
 #include <ufs/inode.h>
 #else
 #include <ufs/ufs/dinode.h>
 #endif
-#endif
 
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
@@ -318,7 +317,7 @@ rmtwrite(const char *buf, size_t count)
 {
        char line[30];
 
-       (void)snprintf(line, sizeof (line), "W%d\n", count);
+       (void)snprintf(line, sizeof (line), "W%ld\n", (long)count);
        write(tormtape, line, strlen(line));
        write(tormtape, buf, count);
        return (rmtreply("write"));