From c3a4785d35831c09f526a9bc705e89b699ba3682 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 24 Feb 2019 11:59:48 +0100 Subject: [PATCH] stat, lstat: Fix conflict with relocatable-prog-wrapper module. * lib/stat.c: On platforms other than OSF/1, include , not "sys/stat.h". * lib/lstat.c: Likewise. * lib/fstat.c: Likewise. * lib/fstatat.c: Likewise. --- ChangeLog | 9 +++++++++ lib/fstat.c | 6 +++++- lib/fstatat.c | 6 +++++- lib/lstat.c | 6 +++++- lib/stat.c | 6 +++++- 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75dbeb0ff7..176bff1952 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2019-02-24 Bruno Haible + + stat, lstat: Fix conflict with relocatable-prog-wrapper module. + * lib/stat.c: On platforms other than OSF/1, include , not + "sys/stat.h". + * lib/lstat.c: Likewise. + * lib/fstat.c: Likewise. + * lib/fstatat.c: Likewise. + 2019-02-23 Bernhard Voelker long-options: add parse_gnu_standard_options_only diff --git a/lib/fstat.c b/lib/fstat.c index 4f0e618810..a892b8ff7f 100644 --- a/lib/fstat.c +++ b/lib/fstat.c @@ -40,10 +40,14 @@ orig_fstat (int fd, struct stat *buf) #endif /* Specification. */ +#ifdef __osf__ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ -#include "sys/stat.h" +# include "sys/stat.h" +#else +# include +#endif #include "stat-time.h" diff --git a/lib/fstatat.c b/lib/fstatat.c index 515b569399..019d3c6163 100644 --- a/lib/fstatat.c +++ b/lib/fstatat.c @@ -36,10 +36,14 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) } #endif +#ifdef __osf__ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ -#include "sys/stat.h" +# include "sys/stat.h" +#else +# include +#endif #include "stat-time.h" diff --git a/lib/lstat.c b/lib/lstat.c index d57ca105fd..a3e40d826f 100644 --- a/lib/lstat.c +++ b/lib/lstat.c @@ -42,10 +42,14 @@ orig_lstat (const char *filename, struct stat *buf) } /* Specification. */ +# ifdef __osf__ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ -# include "sys/stat.h" +# include "sys/stat.h" +# else +# include +# endif # include "stat-time.h" diff --git a/lib/stat.c b/lib/stat.c index 74f47954c1..e4fc2cb930 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -42,10 +42,14 @@ orig_stat (const char *filename, struct stat *buf) #endif /* Specification. */ +#ifdef __osf__ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ -#include "sys/stat.h" +# include "sys/stat.h" +#else +# include +#endif #include "stat-time.h" -- 2.39.5