On 05/03/19 13:37, Assaf Gordon wrote:
> On 2019-03-05 2:17 p.m., Assaf Gordon wrote:
>> On 2019-03-04 3:18 a.m., Pádraig Brady wrote:
>>> We plan to release coreutils-8.31 in the coming week
>>
>> Thanks for all the hard work, and for cleaning up and finalizing the 
>> 'env' patch.
>>
> 
> On AIX-7.2 compiling for 64bit with CC="xlc -q64",
> compilation fails with:
> ====
> CCLD     src/split
> CC       src/stat.o
> "src/stat.c", line 1015.14: 1506-007 (S) "struct statx" is undefined.
> "src/stat.c", line 1017.21: 1506-280 (W) Function argument assignment 
> between types "char*" and "int" is not allowed.
> "src/stat.c", line 1017.31: 1506-280 (W) Function argument assignment 
> between types "struct stat*" and "const char*" is not allowed.
> "src/stat.c", line 1019.21: 1506-045 (S) Undeclared identifier STATX_BTIME.
> "src/stat.c", line 1019.35: 1506-099 (S) Unexpected argument.
> "src/stat.c", line 1020.21: 1506-280 (W) Function argument assignment 
> between types "char*" and "int" is not allowed.
> "src/stat.c", line 1020.25: 1506-280 (W) Function argument assignment 
> between types "struct stat*" and "char*" is not allowed.
> "src/stat.c", line 1020.29: 1506-045 (S) Undeclared identifier 
> AT_EMPTY_PATH.
> "src/stat.c", line 1020.58: 1506-099 (S) Unexpected argument.
> make: 1254-004 The error code from the last command is 1.
> ====

Interesting, AIX must have a separate statx.
The attached should avoid this build issue.

cheers,
Pádraig

>From 3f6a99fcbffdd4051ada512fc21d75270f26b6dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Wed, 6 Mar 2019 10:46:25 -0800
Subject: [PATCH] build: avoid statx related build failure on AIX

* src/stat.c (get_birthtime): Check also for STATX_BTIME define,
as a different statx is available on AIX 7.2.
---
 src/stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stat.c b/src/stat.c
index 6e2f4a3..bb1ef1a 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1009,7 +1009,7 @@ get_birthtime (int fd, char const *filename, struct stat const *st)
     }
 #endif
 
-#if HAVE_STATX
+#if HAVE_STATX && defined STATX_BTIME
   if (ts.tv_nsec < 0)
     {
       struct statx stx;
-- 
2.9.3

Reply via email to