aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2021-12-02 18:18:39 -0800
committerPaul Eggert2021-12-02 18:20:05 -0800
commite0ee1d003ac84ba32b6c23575ddaeabb932cd6e1 (patch)
treeaf6a0493ecb593be4eb66239fef69a114720c59c /src
parent6b99b6eb8bc5ee5b7ee8c17a636c9ba154702b5c (diff)
downloademacs-e0ee1d003ac84ba32b6c23575ddaeabb932cd6e1.tar.gz
emacs-e0ee1d003ac84ba32b6c23575ddaeabb932cd6e1.zip
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”.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 3c13d3fe416..7e3bebca9e6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2386,7 +2386,9 @@ permissions. */)
2386 2386
2387 if (!NILP (keep_time)) 2387 if (!NILP (keep_time))
2388 { 2388 {
2389 struct timespec ts[] = { get_stat_atime (&st), get_stat_mtime (&st) }; 2389 struct timespec ts[2];
2390 ts[0] = get_stat_atime (&st);
2391 ts[1] = get_stat_mtime (&st);
2390 if (futimens (ofd, ts) != 0) 2392 if (futimens (ofd, ts) != 0)
2391 xsignal2 (Qfile_date_error, 2393 xsignal2 (Qfile_date_error,
2392 build_string ("Cannot set file date"), newname); 2394 build_string ("Cannot set file date"), newname);