check fchmod existence for portabilityy

This commit is contained in:
Cedric Bail 2013-03-13 07:46:30 +01:00 committed by Cedric BAIL
parent e5f343f79a
commit 709b975ca3
2 changed files with 4 additions and 0 deletions

View File

@ -732,6 +732,8 @@ AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"],
### Checks for library functions
AC_CHECK_FUNCS([fchmod])
EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open splice setxattr])
enable_log="no"

View File

@ -1747,8 +1747,10 @@ eina_file_copy(const char *src, const char *dst, Eina_File_Copy_Flags flags, Ein
success = _eina_file_copy_internal(s, d, st.st_size, cb, cb_data);
if (success)
{
#ifdef HAVE_FCHMOD
if (flags & EINA_FILE_COPY_PERMISSION)
fchmod(d, st.st_mode);
#endif
if (flags & EINA_FILE_COPY_XATTR)
eina_xattr_fd_copy(s, d);
}