summaryrefslogtreecommitdiff
path: root/src/pacman/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/conf.c')
-rw-r--r--src/pacman/conf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index a4d115dd..5328e7cc 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -203,11 +203,14 @@ static int download_with_xfercommand(const char *url, const char *localpath,
cleanup:
/* restore the old cwd if we have it */
if(cwdfd >= 0) {
+ int ret;
if(fchdir(cwdfd) != 0) {
pm_printf(ALPM_LOG_ERROR, _("could not restore working directory (%s)\n"),
strerror(errno));
}
- close(cwdfd);
+ do {
+ ret = close(cwdfd);
+ } while(ret == -1 && errno == EINTR);
}
if(ret == -1) {
@@ -522,7 +525,7 @@ static int _add_mirror(alpm_db_t *db, char *value)
static int setup_libalpm(void)
{
int ret = 0;
- enum _alpm_errno_t err;
+ alpm_errno_t err;
alpm_handle_t *handle;
pm_printf(ALPM_LOG_DEBUG, "setup_libalpm called\n");
@@ -659,7 +662,7 @@ static int finish_section(struct section_t *section, int parse_options)
}
for(i = section->servers; i; i = alpm_list_next(i)) {
- char *value = alpm_list_getdata(i);
+ char *value = i->data;
if(_add_mirror(db, value) != 0) {
pm_printf(ALPM_LOG_ERROR,
_("could not add mirror '%s' to database '%s' (%s)\n"),