[BusyBox] patch: unstable coreutils/ls.c fails to compile
earl
earl at stanfordalumni.org
Sun Jun 8 12:53:38 UTC 2003
Hi,
I was unable to compile coreutils/ls.c from the unstable branch with a
configuration that had:
# CONFIG_FEATURE_LS_SORTFILES is not set
# CONFIG_FEATURE_LS_TIMESTAMPS is not set
The compiler doesn't like the references to SORT_MASK and TIME_MASK
since they were conditionally defined only if the above CONFIG flags
were enabled, and they weren't for me. I'm not sure if this is the
right fix but here's my patch to get it to compile.
earl
diff -Naur busybox-orig/coreutils/ls.c busybox/coreutils/ls.c
--- busybox-orig/coreutils/ls.c Sun Jun 8 05:16:57 2003
+++ busybox/coreutils/ls.c Sun Jun 8 05:17:56 2003
@@ -902,15 +902,19 @@
if (flags & STYLE_MASK_TRIGGER) {
all_fmt &= ~STYLE_MASK;
}
+#ifdef CONFIG_FEATURE_LS_SORTFILES
if (flags & SORT_MASK_TRIGGER) {
all_fmt &= ~SORT_MASK;
}
+#endif
if (flags & DISP_MASK_TRIGGER) {
all_fmt &= ~DISP_MASK;
}
+#ifdef CONFIG_FEATURE_LS_SORTFILES
if (flags & TIME_MASK_TRIGGER) {
all_fmt &= ~TIME_MASK;
}
+#endif
#ifdef CONFIG_FEATURE_HUMAN_READABLE
if (opt == 'l') {
all_fmt &= ~LS_DISP_HR;
More information about the busybox
mailing list