Attempt to fix the build on NetBSD
authorVolker Lendecke <vl@samba.org>
Tue, 26 May 2009 20:39:50 +0000 (22:39 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 26 May 2009 21:20:34 +0000 (23:20 +0200)
source3/include/includes.h
source3/lib/system.c
source3/smbd/trans2.c

index a2f6048c278e107785b7e6e84c03309f20b4224f..0d66c1cd6b2197fc9c098f517303ebefc725df8b 100644 (file)
@@ -451,6 +451,9 @@ struct stat_ex {
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
 
+       uint32_t        st_ex_flags;
+       uint32_t        st_ex_mask;
+
        /*
         * Add space for VFS internal extensions. The initial user of this
         * would be the onefs modules, passing the snapid from the stat calls
index 5158750f983dd990d69cb6774862034d2e3f2af1..d9d3266fbc56dae494565e6beb85bcb18f5d0f8a 100644 (file)
@@ -477,6 +477,12 @@ static void init_stat_ex_from_stat (struct stat_ex *dst,
        dst->st_ex_btime = get_create_timespec(src);
        dst->st_ex_blksize = src->st_blksize;
        dst->st_ex_blocks = src->st_blocks;
+
+#ifdef HAVE_STAT_ST_FLAGS
+       dst->st_ex_flags = src->st_flags;
+#else
+       dst->st_ex_flags = 0;
+#endif
 }
 
 /*******************************************************************
index ef7f6170108188d6e8cb6d6e1043f5610bbe29f1..1d95c207bafc9c8c6a4b488457841c69bf4e6a50 100644 (file)
@@ -3613,7 +3613,6 @@ static const struct {unsigned stat_fflag; unsigned smb_fflag;}
 static void map_info2_flags_from_sbuf(const SMB_STRUCT_STAT *psbuf,
                                uint32 *smb_fflags, uint32 *smb_fmask)
 {
-#ifdef HAVE_STAT_ST_FLAGS
        int i;
 
        for (i = 0; i < ARRAY_SIZE(info2_flags_map); ++i) {
@@ -3622,7 +3621,6 @@ static void map_info2_flags_from_sbuf(const SMB_STRUCT_STAT *psbuf,
                    *smb_fflags |= info2_flags_map[i].smb_fflag;
            }
        }
-#endif /* HAVE_STAT_ST_FLAGS */
 }
 
 static bool map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
@@ -3630,7 +3628,6 @@ static bool map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
                                const uint32 smb_fmask,
                                int *stat_fflags)
 {
-#ifdef HAVE_STAT_ST_FLAGS
        uint32 max_fmask = 0;
        int i;
 
@@ -3660,9 +3657,6 @@ static bool map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
        }
 
        return True;
-#else
-       return False;
-#endif /* HAVE_STAT_ST_FLAGS */
 }