summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/alphasort64.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/dirent/alphasort64.c')
-rw-r--r--libc/misc/dirent/alphasort64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/misc/dirent/alphasort64.c b/libc/misc/dirent/alphasort64.c
new file mode 100644
index 000000000..94194e0c6
--- /dev/null
+++ b/libc/misc/dirent/alphasort64.c
@@ -0,0 +1,16 @@
+#include <features.h>
+#define _FILE_OFFSET_BITS 64
+#define __USE_LARGEFILE64
+#define __USE_FILE_OFFSET64
+#include <string.h>
+#include "dirstream.h"
+
+#ifdef __UCLIBC_HAVE_LFS__
+
+int alphasort64(const void * a, const void * b)
+{
+ return strcmp ((*(const struct dirent64 **) a)->d_name,
+ (*(const struct dirent64 **) b)->d_name);
+}
+#endif /* __UCLIBC_HAVE_LFS__ */
+