From f3c01c71b69d963986d09814a8c4127b12c20f8c Mon Sep 17 00:00:00 2001
From: Marcus Meissner <meissner@suse.de>
Date: Thu, 9 Nov 2023 14:57:46 +0100
Subject: [PATCH] cast mtime to long long to avoid 32bit time issues

---
 gphoto2/actions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gphoto2/actions.c b/gphoto2/actions.c
index c860771..c052a92 100644
--- a/gphoto2/actions.c
+++ b/gphoto2/actions.c
@@ -382,7 +382,7 @@ print_file_action (GPParams *p, const char *folder, const char *filename)
                 if (info.file.fields & GP_FILE_INFO_TYPE)
                     printf(" FILETYPE=%s", info.file.type);
                 if (info.file.fields & GP_FILE_INFO_MTIME)
-                    printf(" FILEMTIME=%ld", info.file.mtime);
+                    printf(" FILEMTIME=%lld", (long long)info.file.mtime);
                 printf("\n");
             } else
                 printf ("FILENAME='%s/%s'\n", folder, filename);
@@ -406,7 +406,7 @@ print_file_action (GPParams *p, const char *folder, const char *filename)
 		    if (info.file.fields & GP_FILE_INFO_TYPE)
                 printf(" %s", info.file.type);
 		    if (info.file.fields & GP_FILE_INFO_MTIME)
-                printf(" %ld", info.file.mtime);
+                printf(" %lld", (long long)info.file.mtime);
 		    putchar ('\n');
 		} else
 		    printf("#%-5i %s\n", x+1, filename);
-- 
2.42.1

