Include ext2fsP.h in fileio.c for ext2fs_file_block_offset_too_big()
declaration. Fix up the declaration to mark it extern in the header.
Include <strings.h> header for strcasecmp() in tune2fs.c if available,
as described in the strcasecmp(3) man page, instead of doing this
indirectly by declaring _BSD_SOURCE and getting it from <string.h>.
If CONFIG_QUOTA is undefined, parse_quota_opts() is unused in
tune2fs.c so #ifdef it out.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
extern int ext2fs_mem_is_zero(const char *mem, size_t len);
-int ext2fs_file_block_offset_too_big(ext2_filsys fs,
- struct ext2_inode *inode,
- blk64_t offset);
+extern int ext2fs_file_block_offset_too_big(ext2_filsys fs,
+ struct ext2_inode *inode,
+ blk64_t offset);
#include "ext2_fs.h"
#include "ext2fs.h"
+#include "ext2fsP.h"
struct ext2_file {
errcode_t magic;
*/
#define _XOPEN_SOURCE 600 /* for inclusion of strptime() */
-#define _BSD_SOURCE /* for inclusion of strcasecmp() */
#include "config.h"
#include <fcntl.h>
#include <grp.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h> /* for strcasecmp() */
+#else
+#define _BSD_SOURCE /* for inclusion of strcasecmp() via <string.h> */
+#endif
#include <string.h>
#include <time.h>
#include <unistd.h>
return;
}
+#ifdef CONFIG_QUOTA
static void parse_quota_opts(const char *opts)
{
char *buf, *token, *next, *p;
}
free(buf);
}
-
-
+#endif
static void parse_e2label_options(int argc, char ** argv)
{