mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
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>
This commit is contained in:
parent
111e07d0be
commit
87240dae6d
@ -30,7 +30,6 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <limits.h> /* PATH_MAX */
|
#include <limits.h> /* PATH_MAX */
|
||||||
#include <locale.h> /* setlocale */
|
|
||||||
|
|
||||||
/* libarchive */
|
/* libarchive */
|
||||||
#include <archive.h>
|
#include <archive.h>
|
||||||
@ -912,5 +911,4 @@ pmdb_t *_alpm_db_register_local(void)
|
|||||||
return(db);
|
return(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <locale.h> /* setlocale */
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
/* libarchive */
|
/* libarchive */
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <locale.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
/* libarchive */
|
/* libarchive */
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
#include <locale.h> /* setlocale */
|
||||||
|
|
||||||
/* libarchive */
|
/* libarchive */
|
||||||
#include <archive.h>
|
#include <archive.h>
|
||||||
@ -210,7 +211,7 @@ char *_alpm_strtrim(char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create a lock file */
|
/* Create a lock file */
|
||||||
int _alpm_lckmk()
|
int _alpm_lckmk(void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
char *dir, *ptr;
|
char *dir, *ptr;
|
||||||
@ -240,7 +241,7 @@ int _alpm_lckmk()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Remove a lock file */
|
/* Remove a lock file */
|
||||||
int _alpm_lckrm()
|
int _alpm_lckrm(void)
|
||||||
{
|
{
|
||||||
const char *file = alpm_option_get_lockfile();
|
const char *file = alpm_option_get_lockfile();
|
||||||
if(unlink(file) == -1 && errno != ENOENT) {
|
if(unlink(file) == -1 && errno != ENOENT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user