HomeFreeBSD

Include <locale.h> to avoid error: 'LC_ALL' undeclared.

Description

Include <locale.h> to avoid error: 'LC_ALL' undeclared.

When compiling ZFS with CFLAGS=-O0 it will trigger the following error.
Resolve the issue by properly including locale.h.

../../cmd/mount_zfs/mount_zfs.c: In function 'main':
../../cmd/mount_zfs/mount_zfs.c:318:2: warning: implicit declaration
    of function 'setlocale' [-Wimplicit-function-declaration]
../../cmd/mount_zfs/mount_zfs.c:318:19: error: 'LC_ALL' undeclared
    (first use in this function)

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #724

Details

Provenance
Daniel Verite <daniel@verite.pro>Authored on Jun 8 2012, 8:30 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 11 2012, 5:21 PM
Parents
rG6a0936babc14: Linux 3.4 compat, d_make_root() replaces d_alloc_root()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG92e91da20839: Include <locale.h> to avoid error: 'LC_ALL' undeclared. (authored by Daniel Verite <daniel@verite.pro>).Jun 11 2012, 5:21 PM