X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmake_ext4fs.git;a=blobdiff_plain;f=make_ext4fs.c;h=dd4d0d3f301ab45d2135d28e5af5ce47ac3919ad;hp=cb181617797db10f8c2a575dc500e5f86bfdb678;hb=bd53eaafbc2a89a57b8adda38f53098a431fa8f4;hpb=98e3d5c1ceddd4a32b92c1cfafe929fe006fb98c diff --git a/make_ext4fs.c b/make_ext4fs.c index cb18161..dd4d0d3 100644 --- a/make_ext4fs.c +++ b/make_ext4fs.c @@ -33,6 +33,7 @@ #include #include #include +#include /* TODO: Not implemented: Allocating blocks in the same block group as the file inode @@ -66,6 +67,9 @@ static u32 build_directory_structure(const char *full_path, const char *dir_path u32 dirs = 0; bool needs_lost_and_found = false; + /* alphasort is locale-dependent; let's fix the locale to some sane value */ + setlocale(LC_COLLATE, "C"); + if (full_path) { entries = scandir(full_path, &namelist, filter_dot, (void*)alphasort); if (entries < 0) {