Bug 218540

Summary: nfs-utils fail to compile on armhf due to time_t transitioning to 64bit in Debian
Product: File System Reporter: Vladimir Petko (vladimir.petko)
Component: NFSAssignee: Trond Myklebust (trondmy)
Status: NEW ---    
Severity: normal CC: carnil
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: patch the issue by the explicit cast to long long int

Description Vladimir Petko 2024-02-28 22:02:43 UTC
I apologise if I am submitting it to a wrong bug tracker. 

nfs-utils fail to compile on armhf due to time_t transition due to -Werror=format when building:

export-cache.c: In function ‘junction_flush_exports_cache’:
export-cache.c:110:51: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
  110 | snprintf(flushtime, sizeof(flushtime), "%ld\n", now);
      | ~~^ ~~~
      | | |
      | | time_t {aka long long int}
      | long int
      | %lld

see[1]


[1] https://launchpadlibrarian.net/716561911/buildlog_ubuntu-noble-armhf.nfs-utils_1%3A2.6.4-3ubuntu1_BUILDING.txt.gz
Comment 1 Vladimir Petko 2024-02-29 04:03:17 UTC
Created attachment 305927 [details]
patch the issue by the explicit cast to long long int
Comment 2 Salvatore Bonaccorso 2024-04-06 19:29:12 UTC
Posted to the linux-nfs list: https://lore.kernel.org/linux-nfs/ZhGfUpXclZeoZ_az@eldamar.lan/