Applied patch from Gennady Feldman to use single-thread instead of forking.
[oweals/busybox.git] / sort.c
diff --git a/sort.c b/sort.c
index efff6b65387c922f4df8d0339489edcb4e6462b4..9707efa51c5f65f6e010e4ff9379f36f7407ce8e 100644 (file)
--- a/sort.c
+++ b/sort.c
  *
  */
 
+#include <getopt.h>
+#include <string.h>
+#include <stdlib.h>
 #include "busybox.h"
 
-int compare_ascii(const void *x, const void *y)
+static int compare_ascii(const void *x, const void *y)
 {
        return strcmp(*(char **)x, *(char **)y);
 }
 
-int compare_numeric(const void *x, const void *y)
+static int compare_numeric(const void *x, const void *y)
 {
        return atoi(*(char **)x) - atoi(*(char **)y);
 }
@@ -54,7 +57,7 @@ int sort_main(int argc, char **argv)
                                break;
 #endif
                        default:
-                               usage(sort_usage);
+                               show_usage();
                }
        }