diff options
Diffstat (limited to 'libc/misc/dirent/versionsort64.c')
-rw-r--r-- | libc/misc/dirent/versionsort64.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libc/misc/dirent/versionsort64.c b/libc/misc/dirent/versionsort64.c new file mode 100644 index 000000000..684a46283 --- /dev/null +++ b/libc/misc/dirent/versionsort64.c @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2008-2009 Hai Zaar, Codefidence Ltd <haizaar@codefidence.com> + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include <_lfs_64.h> + +#include <dirent.h> +#include <string.h> +#include "dirstream.h" + +int versionsort64(const void *a, const void *b) +{ + return strverscmp((*(const struct dirent64 **) a)->d_name, + (*(const struct dirent64 **) b)->d_name); +} |