Daniel Black wrote:
having trouble compiling dovecot-1.1hg latest pull
dito. ST_MTIME_NSEC is ((unsigned long)(st).st_mtim.tv_nsec) (at least on my system), but st in maildir-uidlist.c:322 is a pointer, so -> has to be used. Here's a (quick'n'dirty, probably incomplete) patch: diff -r 6ab2ccae0868 src/lib-storage/index/maildir/maildir-uidlist.c --- a/src/lib-storage/index/maildir/maildir-uidlist.c Sat May 17 02:25:40 2008 +0300 +++ b/src/lib-storage/index/maildir/maildir-uidlist.c Sun May 18 16:44:30 2008 +0200 @@ -318,7 +318,7 @@ static void maildir_uidlist_update_hdr(s struct maildir_index_header *mhdr = &uidlist->mbox->maildir_hdr; mhdr->uidlist_mtime = st->st_mtime; - mhdr->uidlist_mtime_nsecs = ST_MTIME_NSEC(st); + mhdr->uidlist_mtime_nsecs = ST_MTIME_NSEC_REF(st); mhdr->uidlist_size = st->st_size; } diff -r 6ab2ccae0868 src/lib/compat.h --- a/src/lib/compat.h Sat May 17 02:25:40 2008 +0300 +++ b/src/lib/compat.h Sun May 18 16:44:30 2008 +0200 @@ -67,6 +67,7 @@ typedef int socklen_t; # define HAVE_ST_NSECS # define ST_ATIME_NSEC(st) ((unsigned long)(st).st_atim.tv_nsec) # define ST_MTIME_NSEC(st) ((unsigned long)(st).st_mtim.tv_nsec) +# define ST_MTIME_NSEC_REF(st) ((unsigned long)(st)->st_mtim.tv_nsec) # define ST_CTIME_NSEC(st) ((unsigned long)(st).st_ctim.tv_nsec) #elif defined (HAVE_STAT_XTIMESPEC) # define HAVE_ST_NSECS