Skip to content

Commit afd90dc

Browse files
sswamy48pmatilai
authored andcommitted
AIX: Fix compilation error due to __errno_location
This is an initial patch in a series of patches to fix errors on AIX. In AIX we can see errors as below. /home/sangam/rpm-ci/rpm/misc/fts.c:88:31: warning: implicit declaration of function '__errno_location' [-Wimplicit-function-declaration] 88 | # define __set_errno(val) (*__errno_location ()) = (val) | ^~~~~~~~~~~~~~~~ /home/sangam/rpm-ci/rpm/misc/fts.c:149:3: note: in expansion of macro '__set_errno' 149 | __set_errno (EINVAL); | ^~~~~~~~~~~ The proposed patch fixes this issue. Please review the patch and let me know your comments.
1 parent 9db75f1 commit afd90dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

misc/fts.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
7272
# define stat64 stat
7373
#endif
7474
#endif
75+
#if defined(_AIX)
76+
# define __errno_location() (&errno)
77+
#endif
7578

7679
#include "system.h"
7780
#include <fcntl.h>

0 commit comments

Comments
 (0)