ChangeLog, mke2fs.c:
mke2fs.c (PRS): Use __u64 instead of long long for portability
reasons.
Moved #include of sys/stat.h inside #ifdef HAVE_LINUX_MAJOR_H for
portability reasons.
ChangeLog, util.c:
util.c: For NT portability, don't redefine getchar(), since stdio
defines that. Instead we introduce a new abstract macro read_a_char()
which is #defined to the right function as necessary.
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 6f38099..508aafb 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -2,6 +2,9 @@
* mke2fs.c (show_stats): Capitalized Hurd to make the GNU types
happy.
+ (PRS): Use __u64 instead of long long for portability
+ reasons. Also moved #include of sys/stat.h inside #ifdef
+ HAVE_LINUX_MAJOR_H for portability reasons.
* fsck.c (execute): Fix really stupid bug in the linked list
management which caused fsck in parallel mode to go into
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 1c1c19a..5ab30eb 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -40,7 +40,6 @@
#endif
#include <sys/ioctl.h>
#include <sys/types.h>
-#include <sys/stat.h>
#ifdef HAVE_LINUX_FS_H
#include <linux/fs.h>
@@ -48,6 +47,7 @@
#include <linux/ext2_fs.h>
#ifdef HAVE_LINUX_MAJOR_H
#include <linux/major.h>
+#include <sys/stat.h> /* Only need sys/stat.h for major nr test */
#endif
#include "et/com_err.h"
@@ -952,7 +952,7 @@
* Calculate number of inodes based on the inode ratio
*/
param.s_inodes_count = num_inodes ? num_inodes :
- ((long long) param.s_blocks_count * EXT2_BLOCK_SIZE(¶m))
+ ((__u64) param.s_blocks_count * EXT2_BLOCK_SIZE(¶m))
/ inode_ratio;
/*