From 66ca14e807e6965e50a128e3847152605ded32eb Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 14 Feb 2008 16:47:56 +0000 Subject: [PATCH] Correctly check for HAVE_FCHMOD and HAVE_FCHOWN 2008-02-14 Alexander Larsson * glocalfileoutputstream.c: Correctly check for HAVE_FCHMOD and HAVE_FCHOWN svn path=/trunk/; revision=6518 --- gio/ChangeLog | 5 +++++ gio/glocalfileoutputstream.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index ebb1f8800..0ffa8f594 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,8 @@ +2008-02-14 Alexander Larsson + + * glocalfileoutputstream.c: + Correctly check for HAVE_FCHMOD and HAVE_FCHOWN + 2008-02-14 Alexander Larsson * glocalfile.c: diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c index bd394093b..7f0d65fa6 100644 --- a/gio/glocalfileoutputstream.c +++ b/gio/glocalfileoutputstream.c @@ -716,10 +716,10 @@ handle_overwrite_open (const char *filename, /* try to keep permissions */ if ( -#ifdef F_CHOWN +#ifdef HAVE_FCHOWN fchown (tmpfd, original_stat.st_uid, original_stat.st_gid) == -1 || #endif -#ifdef F_CHMOD +#ifdef HAVE_FCHMOD fchmod (tmpfd, original_stat.st_mode) == -1 || #endif 0 @@ -783,7 +783,7 @@ handle_overwrite_open (const char *filename, * original file. If this fails, set the protection * bits for the group same as the protection bits for * others. */ -#ifdef HAVE_FCHOWN +#if defined(HAVE_FCHOWN) && defined(HAVE_FCHMOD) if (fstat (bfd, &tmp_statbuf) != 0) { g_set_error (error,