make_ext4fs: explicitly call setlocale() before creating image
authorWojtek Porczyk <woju@invisiblethingslab.com>
Wed, 2 Dec 2015 15:08:01 +0000 (16:08 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 2 Dec 2015 16:05:03 +0000 (17:05 +0100)
commitbd53eaafbc2a89a57b8adda38f53098a431fa8f4
treed4611c1a3fe51cc66777cf2539acefbeda07c1d7
parent98e3d5c1ceddd4a32b92c1cfafe929fe006fb98c
make_ext4fs: explicitly call setlocale() before creating image

The alphasort(3) function, which is used as comparison function for
scandir(3) is locale dependent (at least in glibc, in which it defers to
strcoll(3)). This patch explicitly calls setlocale(3), setting the
locale to "C".

Currently, there are no other calls to setlocale(), so this does not
change the behaviour. However, we'd like to be sure that in the future
no-one will break that.

Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
make_ext4fs.c