[patch] fix run_parts
stephane.billiart at gmail.com
stephane.billiart at gmail.com
Wed Jun 7 14:56:11 PDT 2006
The attached patch fix run_parts compilation when CONFIG_GETOPT_LONG is
not set, replacing getopt_long with bb_getopt_ulflags.
--
Stéphane Billiart http://perso.orange.fr/billiart/
-------------- next part --------------
Index: debianutils/run_parts.c
===================================================================
--- debianutils/run_parts.c (revision 15327)
+++ debianutils/run_parts.c (working copy)
@@ -39,13 +39,14 @@
#include <getopt.h>
#include <stdlib.h>
-
+#if ENABLE_FEATURE_RUN_PARTS_LONG_OPTIONS
static const struct option runparts_long_options[] = {
{ "test", 0, NULL, 't' },
{ "umask", 1, NULL, 'u' },
{ "arg", 1, NULL, 'a' },
{ 0, 0, 0, 0 }
};
+#endif
extern char **environ;
@@ -60,8 +61,10 @@
umask(022);
- while ((opt = getopt_long (argc, argv, "tu:a:",
- runparts_long_options, NULL)) > 0)
+#if ENABLE_FEATURE_RUN_PARTS_LONG_OPTIONS
+ bb_applet_long_options = runparts_long_options;
+#endif
+ while ((opt = bb_getopt_ulflags (argc, argv, "tu:a:")) > 0)
{
switch (opt) {
/* Enable test mode */
More information about the busybox
mailing list