[vlc-commits] cache: fix year 2038 problem and FILE_OFFSET_BITS dependency
Rémi Denis-Courmont
git at videolan.org
Thu Oct 27 16:03:46 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 27 17:02:45 2016 +0300| [870ef77666544b5b69efec073c838649e62fe008] | committer: Rémi Denis-Courmont
cache: fix year 2038 problem and FILE_OFFSET_BITS dependency
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=870ef77666544b5b69efec073c838649e62fe008
---
src/modules/cache.c | 6 +++---
src/modules/modules.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index 81a0fbd..5fc8c20 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -57,7 +57,7 @@
#ifdef HAVE_DYNAMIC_PLUGINS
/* Sub-version number
* (only used to avoid breakage in dev version when cache structure changes) */
-#define CACHE_SUBVERSION_NUM 30
+#define CACHE_SUBVERSION_NUM 31
/* Cache filename */
#define CACHE_NAME "plugins.dat"
@@ -750,8 +750,8 @@ vlc_plugin_t *vlc_cache_lookup(vlc_plugin_t **cache,
* stats. This will save time in following look-ups. */
if (plugin->path != NULL
&& !strcmp(plugin->path, path)
- && plugin->mtime == st->st_mtime
- && plugin->size == st->st_size)
+ && plugin->mtime == (int64_t)st->st_mtime
+ && plugin->size == (uint64_t)st->st_size)
{
*pp = plugin->next;
plugin->next = NULL;
diff --git a/src/modules/modules.h b/src/modules/modules.h
index 0b59453..387ab62 100644
--- a/src/modules/modules.h
+++ b/src/modules/modules.h
@@ -55,8 +55,8 @@ typedef struct vlc_plugin_t
char *abspath; /**< Absolute path */
char *path; /**< Relative path (within plug-in directory) */
- time_t mtime; /**< Last modification time */
- off_t size; /**< File size */
+ int64_t mtime; /**< Last modification time */
+ uint64_t size; /**< File size */
} vlc_plugin_t;
/**
More information about the vlc-commits
mailing list