Skip to content

Commit

Permalink
Some type conversion fixes.
Browse files Browse the repository at this point in the history
Should fix the build on NetBSD/evbarm.
  • Loading branch information
Jonathan Perkin committed Jun 7, 2018
1 parent 829bb92 commit e4621db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pkg_download(Plisthead *installhead)
struct stat st;
char pkg_fs[BUFSIZ];
char *p = NULL;
ssize_t size;
off_t size;
int rc = EXIT_SUCCESS;

SLIST_FOREACH(pinstall, installhead, next) {
Expand Down
8 changes: 4 additions & 4 deletions download.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ sum_close(struct archive *a, void *data)
/*
* Download a package to the local cache.
*/
ssize_t
off_t
download_pkg(char *pkg_url, FILE *fp)
{
struct url_stat st;
size_t size, wrote;
ssize_t fetched, written = 0;
off_t statsize = 0;
ssize_t fetched;
off_t statsize = 0, written = 0;
struct url *url;
fetchIO *f = NULL;
char buf[4096];
Expand Down Expand Up @@ -214,7 +214,7 @@ download_pkg(char *pkg_url, FILE *fp)
else
break;
}
written += (ssize_t)wrote;
written += (off_t)wrote;
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkgin.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Sumfile *sum_open(char *, time_t *);
int sum_start(struct archive *, void *);
ssize_t sum_read(struct archive *, void *, const void **);
int sum_close(struct archive *, void *);
ssize_t download_pkg(char *, FILE *);
off_t download_pkg(char *, FILE *);
/* summary.c */
int update_db(int, char **, int);
void split_repos(void);
Expand Down
2 changes: 1 addition & 1 deletion pkgindb.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pkg_db_mtime(void)

if (rc == SQLITE_ROW) {
db_mtime = sqlite3_column_int64(stmt, 0);
db_ntime = sqlite3_column_int64(stmt, 1);
db_ntime = (long)sqlite3_column_int64(stmt, 1);
} else if (rc == SQLITE_DONE) {
db_mtime = 0;
db_ntime = 0;
Expand Down

0 comments on commit e4621db

Please sign in to comment.