head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.34 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.32 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.30 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.28 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.26 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.24 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.22 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.20 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.18 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.16 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.14 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.12 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.10 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.8 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.6 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.4 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.2 pkgsrc-2022Q1-base:1.2; locks; strict; comment @# @; 1.2 date 2022.01.30.04.00.42; author gutteridge; state Exp; branches; next 1.1; commitid ZRikcEKaBP7jTBqD; 1.1 date 2022.01.24.22.25.06; author buhrow; state Exp; branches; next ; commitid PFDS0DBLgMqtcWpD; desc @@ 1.2 log @imap-uw: fix non-BSD build breakages from previous change set Redo some of the patches from the previous change set (PR pkg/56645) so that they reflect the upstream project's method for including its version of portable_utime(), rather than what was done previously, which broke non-BSD builds, e.g., on Solaris derivates: ld: fatal: symbol 'portable_utime' is multiply-defined: (file .libs/osdep.o type=FUNC; file .libs/utime.o type=FUNC); ld: fatal: file processing errors. No output written to .libs/libc-client.so.5.0.0 Compile tested on NetBSD 9.2_STABLE, NetBSD 9.99.93, OmniOS r151038, and Fedora Linux 34. @ text @$NetBSD: patch-bi,v 1.1 2022/01/24 22:25:06 buhrow Exp $ Enable use of portable_utime() on BSDs. --- src/osdep/unix/os_bsi.h.orig 2011-07-23 00:20:11.000000000 +0000 +++ src/osdep/unix/os_bsi.h @@@@ -34,6 +34,7 @@@@ #include #include #include +#include #include "env_unix.h" @@@@ -41,3 +42,6 @@@@ #include "ftl.h" #include "nl.h" #include "tcp.h" + +#define utime portable_utime +int portable_utime (char *file,time_t timep[2]); @ 1.1 log @These patches fix a very long standing bug where aguments passed to utime(3) by IMAP-UW and the c-client library were incorrect. Unfortunately, on 32-bit systems, the the bug went unnoticed because all the bits lined up correctly. On 64-bit systems, this happenstance doesn't work, meaning the mtime and atime time stamps this software modifies are completely wrong, usually defaulting to the beginning of the epoch, but only because the random memory locations pointed to by the incorrect pointers are 0. Fortunately, the software package includes a portable version of the utime library call that converts the internal usage of this function to one that's compatible with the one resident in libc on NetBSD, FreeBSD and other BSD systems. This patch simply enables that portable code when compiling this package on BSD systems while using the pkgsrc system. These patches have been compiled and are running in production on a 64-bit NetBSD/amd64 system running NetBSD-9.2. Fixes pkg/pr-56645 @ text @d1 1 a1 1 $NetBSD$ d3 13 a15 3 --- src/osdep/unix/os_bsi.h.orig 2011-07-22 17:20:11.000000000 -0700 +++ src/osdep/unix/os_bsi.h 2022-01-15 07:49:59.934504576 -0800 @@@@ -41,3 +41,6 @@@@ a19 1 +#undef utime d21 1 @