← Commit list

e835afadf

Baruch Siach
Baruch Siach
2014-12-17
SUCCESS Duration: 149s

Subject

nandwrite: fix build when long options are disabled

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/nandwrite.c+4 -3
@@ -116,12 +116,13 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
struct mtd_oob_buf oob;
unsigned char *filebuf;
const char *opt_s = "0", *opt_f = "-", *opt_l, *opt_bb;
- static const char nanddump_longopts[] ALIGN1 =
- "bb\0" Required_argument "\xff"; /* no short equivalent */
if (IS_NANDDUMP) {
opt_complementary = "=1";
- applet_long_options = nanddump_longopts;
+#if ENABLE_LONG_OPTS
+ applet_long_options =
+ "bb\0" Required_argument "\xff"; /* no short equivalent */
+#endif
opts = getopt32(argv, "os:f:l:", &opt_s, &opt_f, &opt_l, &opt_bb);
} else { /* nandwrite */
opt_complementary = "-1:?2";