[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Problem with fstatat on AIX 7.1

From: Paul Eggert
Subject: Re: [Bug-tar] Problem with fstatat on AIX 7.1
Date: Thu, 01 Sep 2011 13:21:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110805 Thunderbird/3.1.12

Please try the following patch to tar 1.26, on AIX 7.1.
My hope is that this fixes the fstatat issues
(without the need for those weird 'configure' options)
and then we can move on to the other 'tar' issues.

--- gnu/fstatat.c       2011-03-12 01:14:29.000000000 -0800
+++ gnu/fstatat-fixed.c 2011-09-01 13:14:52.462692942 -0700
@@ -19,8 +19,25 @@
 /* Written by Paul Eggert and Jim Meyering.  */
+/* If the user's config.h happens to include <sys/stat.h>, let it include only
+   the system's <sys/stat.h> here, so that orig_fstatat doesn't recurse to
+   rpl_fstatat.  */
+#define __need_system_sys_stat_h
 #include <config.h>
+/* Get the original definition of fstatat.  It might be defined as a macro.  */
+#include <sys/types.h>
+#include <sys/stat.h>
+#undef __need_system_sys_stat_h
+static inline int
+orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
+  return fstatat (fd, filename, buf, flags);
 #include <sys/stat.h>
 #include <errno.h>
@@ -40,7 +57,7 @@
 rpl_fstatat (int fd, char const *file, struct stat *st, int flag)
-  int result = fstatat (fd, file, st, flag);
+  int result = orig_fstatat (fd, file, st, flag);
   size_t len;
   if (result != 0)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]