diff --git a/development/scons/SConstruct b/development/scons/SConstruct index bd13109e53..6d7ea19578 100644 --- a/development/scons/SConstruct +++ b/development/scons/SConstruct @@ -1018,6 +1018,7 @@ return std::count(a, a+5, 'l'); ('std::istreambuf_iterator', 'HAVE_DECL_ISTREAMBUF_ITERATOR', '#include \n#include '), ('wchar_t', 'HAVE_WCHAR_T', None), + ('mode_t', 'HAVE_MODE_T', "#include "), ], libs = [ ('gdi32', 'HAVE_LIBGDI32'), diff --git a/src/support/copy.C b/src/support/copy.C index ceb2db1968..3b6d328bd7 100644 --- a/src/support/copy.C +++ b/src/support/copy.C @@ -33,7 +33,7 @@ using std::string; bool lyx::support::chmod(string const & file, unsigned long int mode) { -#ifdef HAVE_CHMOD +#if defined (HAVE_CHMOD) && defined (HAVE_MODE_T) if (::chmod(file.c_str(), mode_t(mode)) != 0) return false; #else