From 5f3629bea0d4beb79c6092086b46f3d73643c76d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 7 Sep 2011 10:21:47 -0500 Subject: Introduce alpm_time_t type This will always be a 64-bit signed integer rather than the variable length time_t type. Dates beyond 2038 should be fully supported in the library; the frontend still lags behind because 32-bit platforms provide no localtime64() or equivalent function to convert from an epoch value to a broken down time structure. Signed-off-by: Dan McGee --- src/pacman/callback.c | 1 + src/pacman/package.c | 5 +++-- src/pacman/util.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 3ba07b0c..f62d4449 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -25,6 +25,7 @@ #include #include #include /* off_t */ +#include #include #include #include /* UINT_MAX */ diff --git a/src/pacman/package.c b/src/pacman/package.c index 6a312f9a..84696280 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -74,11 +75,11 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra) from = alpm_pkg_get_origin(pkg); /* set variables here, do all output below */ - bdate = alpm_pkg_get_builddate(pkg); + bdate = (time_t)alpm_pkg_get_builddate(pkg); if(bdate) { strftime(bdatestr, 50, "%c", localtime(&bdate)); } - idate = alpm_pkg_get_installdate(pkg); + idate = (time_t)alpm_pkg_get_installdate(pkg); if(idate) { strftime(idatestr, 50, "%c", localtime(&idate)); } diff --git a/src/pacman/util.c b/src/pacman/util.c index 79fb54dc..ae9f881a 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include -- cgit v1.2.3-24-g4f1b