about summary refs log tree commit diff
path: root/src/dirent/alphasort.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dirent/alphasort.c')
-rw-r--r--src/dirent/alphasort.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dirent/alphasort.c b/src/dirent/alphasort.c
new file mode 100644
index 00000000..42050fb7
--- /dev/null
+++ b/src/dirent/alphasort.c
@@ -0,0 +1,10 @@
+#include <string.h>
+#include <dirent.h>
+#include "libc.h"
+
+int alphasort(const struct dirent **a, const struct dirent **b)
+{
+	return strcoll((*a)->d_name, (*b)->d_name);
+}
+
+LFS64(alphasort);