diff options
Diffstat (limited to 'gl/tests/stat.c')
-rw-r--r-- | gl/tests/stat.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gl/tests/stat.c b/gl/tests/stat.c index f07370dd06..1002f161bf 100644 --- a/gl/tests/stat.c +++ b/gl/tests/stat.c @@ -16,10 +16,13 @@ /* written by Eric Blake */ +/* 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_stat doesn't recurse to + rpl_stat. */ +#define __need_system_sys_stat_h #include <config.h> /* Get the original definition of stat. It might be defined as a macro. */ -#define __need_system_sys_stat_h #include <sys/types.h> #include <sys/stat.h> #undef __need_system_sys_stat_h @@ -31,7 +34,10 @@ orig_stat (const char *filename, struct stat *buf) } /* Specification. */ -#include <sys/stat.h> +/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include <sys/stat.h> + above. */ +#include "sys/stat.h" #include <errno.h> #include <limits.h> |