[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] [PATCH 3/3] tar: fix build failure
From: |
KO Myung-Hun |
Subject: |
[Bug-tar] [PATCH 3/3] tar: fix build failure |
Date: |
Mon, 22 Sep 2014 17:49:19 +0900 |
* src/tar.c: Guard inode feature with D_INO_IN_DIRENT.
-----
CC tar.o
tar.c:1356: error: `SAVEDIR_SORT_INODE' undeclared here (not in a function)
tar.c:1356: error: initializer element is not constant
tar.c:1356: error: (near initialization for `sort_mode_flag[2]')
tar.c:1358: error: negative width in bit-field `_gl_verify_error_if_negative'
---
src/tar.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/tar.c b/src/tar.c
index 059a042..a297c6f 100644
--- a/src/tar.c
+++ b/src/tar.c
@@ -741,7 +741,7 @@ static struct argp_option options[] = {
" for FILE itself"), GRID+1 },
{"exclude-ignore", EXCLUDE_IGNORE_OPTION, N_("FILE"), 0,
N_("read exclude patterns for each directory from FILE, if it exists"),
- GRID+1 },
+ GRID+1 },
{"exclude-ignore-recursive", EXCLUDE_IGNORE_RECURSIVE_OPTION, N_("FILE"), 0,
N_("read exclude patterns for each directory and its subdirectories "
"from FILE, if it exists"), GRID+1 },
@@ -1345,14 +1345,18 @@ static char filename_terminator;
static char const *const sort_mode_arg[] = {
"none",
"name",
+#if D_INO_IN_DIRENT
"inode",
+#endif
NULL
};
static int sort_mode_flag[] = {
SAVEDIR_SORT_NONE,
SAVEDIR_SORT_NAME,
+#if D_INO_IN_DIRENT
SAVEDIR_SORT_INODE
+#endif
};
ARGMATCH_VERIFY (sort_mode_arg, sort_mode_flag);
--
1.7.3.2