diff options
author | Dan McGee <dan@archlinux.org> | 2011-02-01 16:59:12 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-02-01 16:59:12 +0100 |
commit | 87240dae6d4631a812ee81ed53c1622dd164bfcf (patch) | |
tree | 5141771886be0f17a5b9947e8db94ce59ef5e6c5 /lib/libalpm/util.c | |
parent | 111e07d0be44b76b910c6a004421ede4f6f6fb49 (diff) | |
download | pacman-87240dae6d4631a812ee81ed53c1622dd164bfcf.tar.gz pacman-87240dae6d4631a812ee81ed53c1622dd164bfcf.tar.xz |
Fix locale.h/setlocale inclusion with --disable-nls
Noted in FS#22697. When I factored out _alpm_parsedate() into a common
function, I didn't move the <locale.h> include properly, causing a build
failure when NLS is disabled and this header isn't automatically included
everywhere.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r-- | lib/libalpm/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 089b37cb..82387b2f 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -38,6 +38,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <sys/wait.h> +#include <locale.h> /* setlocale */ /* libarchive */ #include <archive.h> @@ -210,7 +211,7 @@ char *_alpm_strtrim(char *str) } /* Create a lock file */ -int _alpm_lckmk() +int _alpm_lckmk(void) { int fd; char *dir, *ptr; @@ -240,7 +241,7 @@ int _alpm_lckmk() } /* Remove a lock file */ -int _alpm_lckrm() +int _alpm_lckrm(void) { const char *file = alpm_option_get_lockfile(); if(unlink(file) == -1 && errno != ENOENT) { |