changeset 4292:5f1069459a07 HEAD

Include <sys/stat.h> before using struct stat, because some systems may use a macro to define struct stat to something else.
author Timo Sirainen <tss@iki.fi>
date Tue, 30 May 2006 16:36:07 +0300
parents c78bd7fb7ce8
children 539a2dcd92b4
files src/lib/istream-internal.h src/lib/istream.h src/lib/nfs-workarounds.h
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/istream-internal.h	Tue May 30 16:14:46 2006 +0300
+++ b/src/lib/istream-internal.h	Tue May 30 16:36:07 2006 +0300
@@ -1,8 +1,6 @@
 #ifndef __ISTREAM_INTERNAL_H
 #define __ISTREAM_INTERNAL_H
 
-#include <sys/stat.h>
-
 #include "istream.h"
 #include "iostream-internal.h"
 
--- a/src/lib/istream.h	Tue May 30 16:14:46 2006 +0300
+++ b/src/lib/istream.h	Tue May 30 16:36:07 2006 +0300
@@ -1,6 +1,9 @@
 #ifndef __ISTREAM_H
 #define __ISTREAM_H
 
+/* Note that some systems (Solaris) may use a macro to redefine struct stat */
+#include <sys/stat.h>
+
 struct istream {
 	uoff_t v_offset;
 
--- a/src/lib/nfs-workarounds.h	Tue May 30 16:14:46 2006 +0300
+++ b/src/lib/nfs-workarounds.h	Tue May 30 16:36:07 2006 +0300
@@ -1,7 +1,8 @@
 #ifndef __NFS_WORKAROUNDS_H
 #define __NFS_WORKAROUNDS_H
 
-struct stat;
+/* Note that some systems (Solaris) may use a macro to redefine struct stat */
+#include <sys/stat.h>
 
 /* When syscall fails with ESTALE error, how many times to try reopening the
    file and retrying the operation. */