aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorBaruch Siach <baruch at tkos.co.il>2014-12-17 17:02:37 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2014-12-17 17:02:37 +0100
commite835afadfe84a820b698f715a01e777f8b7bf833 (patch)
tree67d025d5553d16c299e37b9e7c5b74ac0adbd2cc /miscutils
parent20cd31a2d7cc1b633b725280eb7546ca14eef7eb (diff)
downloadbusybox-w32-e835afadfe84a820b698f715a01e777f8b7bf833.tar.gz
busybox-w32-e835afadfe84a820b698f715a01e777f8b7bf833.tar.bz2
busybox-w32-e835afadfe84a820b698f715a01e777f8b7bf833.zip
nandwrite: fix build when long options are disabled
The Required_argument macro is only defined when long options are enabled. Fixes the following build error: miscutils/nandwrite.c: In function 'nandwrite_main': miscutils/nandwrite.c:120:10: error: expected ',' or ';' before 'Required_argument' Reported-by: Christian Kästner <kaestner at cs.cmu.edu> Signed-off-by: Baruch Siach <baruch at tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/nandwrite.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c
index 29ff351a3..c825fc315 100644
--- a/miscutils/nandwrite.c
+++ b/miscutils/nandwrite.c
@@ -116,12 +116,13 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
116 struct mtd_oob_buf oob; 116 struct mtd_oob_buf oob;
117 unsigned char *filebuf; 117 unsigned char *filebuf;
118 const char *opt_s = "0", *opt_f = "-", *opt_l, *opt_bb; 118 const char *opt_s = "0", *opt_f = "-", *opt_l, *opt_bb;
119 static const char nanddump_longopts[] ALIGN1 =
120 "bb\0" Required_argument "\xff"; /* no short equivalent */
121 119
122 if (IS_NANDDUMP) { 120 if (IS_NANDDUMP) {
123 opt_complementary = "=1"; 121 opt_complementary = "=1";
124 applet_long_options = nanddump_longopts; 122#if ENABLE_LONG_OPTS
123 applet_long_options =
124 "bb\0" Required_argument "\xff"; /* no short equivalent */
125#endif
125 opts = getopt32(argv, "os:f:l:", &opt_s, &opt_f, &opt_l, &opt_bb); 126 opts = getopt32(argv, "os:f:l:", &opt_s, &opt_f, &opt_l, &opt_bb);
126 } else { /* nandwrite */ 127 } else { /* nandwrite */
127 opt_complementary = "-1:?2"; 128 opt_complementary = "-1:?2";