Fixes libwinpr build issue on Windows

Adds conditional statements in file.c to solve a Posix portability
issue on Windows introduced with the following commit:

913d532e0d
This commit is contained in:
Alessandro Pilotti 2013-08-09 02:45:31 +03:00
parent 4f5522f099
commit 644e0efa76

View File

@ -605,6 +605,7 @@ char* GetNamedPipeUnixDomainSocketFilePathA(LPCSTR lpName)
int UnixChangeFileMode(const char* filename, int flags)
{
#ifndef _WIN32
mode_t fl = 0;
fl |= (flags & 0x4000) ? S_ISUID : 0;
@ -621,5 +622,7 @@ int UnixChangeFileMode(const char* filename, int flags)
fl |= (flags & 0x0001) ? S_IXOTH : 0;
return chmod(filename, fl);
#else
return 0;
#endif
}