[MacPorts] #54774: Build mc fails on High Sierra (10)
MacPorts
noreply at macports.org
Fri Sep 22 12:54:04 UTC 2017
#54774: Build mc fails on High Sierra (10)
---------------------+------------------------
Reporter: H3ik0 | Owner: mkae
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: highsierra
Port: mc |
---------------------+------------------------
Comment (by vovinacci):
I've found the source of the problem and now it compiles, however I'm not
really sure if this is the good way to fix it.
It seems that 10.13 uses {{st_mtimespec}} instead of {{{st_mtim}}}
So, simplest patch would be like this
{{{
--- src/filemanager/file.c 2017-09-22 15:47:42.000000000 +0300
+++ src/filemanager/file.c.orig 2017-09-22 15:47:16.000000000 +0300
@@ -665,8 +665,8 @@
get_times (const struct stat *sb, mc_timesbuf_t * times)
{
#ifdef HAVE_UTIMENSAT
- (*times)[0] = sb->st_atimespec;
- (*times)[1] = sb->st_mtimespec;
+ (*times)[0] = sb->st_atim;
+ (*times)[1] = sb->st_mtim;
#else
times->actime = sb->st_atime;
times->modtime = sb->st_mtime;
}}}
HAVE_UTIMENSAT is checked in {{{./confugure}}}, lines 19424-19433
{{{
for ac_func in utimensat
do :
ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
if test "x$ac_cv_func_utimensat" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UTIMENSAT 1
_ACEOF
fi
done
}}}
What would be the best way to fix without breaking builds for old
versions?
--
Ticket URL: <https://trac.macports.org/ticket/54774#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list