diff options
Diffstat (limited to 'gio/glocalfileoutputstream.c')
-rw-r--r-- | gio/glocalfileoutputstream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c index a3dd62172..a8161bd52 100644 --- a/gio/glocalfileoutputstream.c +++ b/gio/glocalfileoutputstream.c @@ -224,9 +224,9 @@ g_local_file_output_stream_write (GOutputStream *stream, #ifdef G_OS_UNIX /* Macro to check if struct iovec and GOutputVector have the same ABI */ #define G_OUTPUT_VECTOR_IS_IOVEC (sizeof (struct iovec) == sizeof (GOutputVector) && \ - sizeof ((struct iovec *) 0)->iov_base == sizeof ((GOutputVector *) 0)->buffer && \ + G_SIZEOF_MEMBER (struct iovec, iov_base) == G_SIZEOF_MEMBER (GOutputVector, buffer) && \ G_STRUCT_OFFSET (struct iovec, iov_base) == G_STRUCT_OFFSET (GOutputVector, buffer) && \ - sizeof ((struct iovec *) 0)->iov_len == sizeof((GOutputVector *) 0)->size && \ + G_SIZEOF_MEMBER (struct iovec, iov_len) == G_SIZEOF_MEMBER (GOutputVector, size) && \ G_STRUCT_OFFSET (struct iovec, iov_len) == G_STRUCT_OFFSET (GOutputVector, size)) static gboolean @@ -979,7 +979,7 @@ handle_overwrite_open (const char *filename, fchown (tmpfd, original_stat.st_uid, original_stat.st_gid) == -1 || #endif #ifdef HAVE_FCHMOD - fchmod (tmpfd, original_stat.st_mode) == -1 || + fchmod (tmpfd, original_stat.st_mode & ~S_IFMT) == -1 || #endif 0 ) |