The Samba-Bugzilla – Attachment 5775 Details for
Bug 7474
unconditional use of st_blocks and st_blksize
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
new patch for 3.5
samba-3.5-no-st_blksize.patch (text/plain), 1.05 KB, created by
Björn Jacke
on 2010-06-09 08:48:09 UTC
(
hide
)
Description:
new patch for 3.5
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2010-06-09 08:48:09 UTC
Size:
1.05 KB
patch
obsolete
>From 4017a28f92f666ff4deb410e263b4479112f21ea Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Mon, 7 Jun 2010 23:06:28 +0200 >Subject: [PATCH] s3: fix build on platforms without st_blocks and st_blksize stat struct members > >This fixes bug 7474. >--- > source3/lib/system.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > >diff --git a/source3/lib/system.c b/source3/lib/system.c >index a58d903..1ce635f 100644 >--- a/source3/lib/system.c >+++ b/source3/lib/system.c >@@ -534,8 +534,17 @@ static void init_stat_ex_from_stat (struct stat_ex *dst, > dst->st_ex_mtime = get_mtimespec(src); > dst->st_ex_ctime = get_ctimespec(src); > make_create_timespec(src, dst, fake_dir_create_times); >+#ifdef HAVE_STAT_ST_BLKSIZE > dst->st_ex_blksize = src->st_blksize; >+#else >+ dst->st_ex_blksize = STAT_ST_BLOCKSIZE; >+#endif >+ >+#ifdef HAVE_STAT_ST_BLOCKS > dst->st_ex_blocks = src->st_blocks; >+#else >+ dst->st_ex_blocks = src->st_size / dst->st_ex_blksize + 1; >+#endif > > #ifdef HAVE_STAT_ST_FLAGS > dst->st_ex_flags = src->st_flags; >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 7474
:
5745
|
5761
| 5775