Work around IBM XL C compiler bug
* src/fileio.c (Fcopy_file): Work around a compiler bug in IBM XL C for AIX, V12.1 (5765-J02, 5725-C72). Without this patch, the compiler incorrectly complains “Initialization between types "int" and "struct timespec" is not allowed” and “Initialization between types "long" and "struct timespec" is not allowed”.
This commit is contained in:
@@ -2386,7 +2386,9 @@ permissions. */)
|
||||
|
||||
if (!NILP (keep_time))
|
||||
{
|
||||
struct timespec ts[] = { get_stat_atime (&st), get_stat_mtime (&st) };
|
||||
struct timespec ts[2];
|
||||
ts[0] = get_stat_atime (&st);
|
||||
ts[1] = get_stat_mtime (&st);
|
||||
if (futimens (ofd, ts) != 0)
|
||||
xsignal2 (Qfile_date_error,
|
||||
build_string ("Cannot set file date"), newname);
|
||||
|
||||
Reference in New Issue
Block a user