diff options
author | Adam Tkac <atkac@redhat.com> | 2011-01-19 14:11:16 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2011-01-19 14:11:16 +0000 |
commit | c4674db3bda3653445a483ab04d244c1e7970a64 (patch) | |
tree | 1d7940d0f7e3444e475cebe383e25eaa5362128b /common | |
parent | 5d4c6acf920cb7baba9c70137e3cbaa6d898830d (diff) | |
download | tigervnc-c4674db3bda3653445a483ab04d244c1e7970a64.tar.gz tigervnc-c4674db3bda3653445a483ab04d244c1e7970a64.zip |
[Bugfix] Don't include unistd.h and don't call access() on Windows.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4239 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common')
-rw-r--r-- | common/rfb/CSecurityTLS.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index 7e694d1b..446674f4 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -29,7 +29,9 @@ #endif #include <stdlib.h> +#ifndef WIN32 #include <unistd.h> +#endif #include <rfb/CSecurityTLS.h> #include <rfb/SSecurityVeNCrypt.h> @@ -95,11 +97,16 @@ void CSecurityTLS::setDefaults() sprintf(caDefault.buf, "%s/.vnc/x509_certs", homeDir); delete [] homeDir; +#ifndef WIN32 /* XXX Do we need access() check here? */ if (!access(caDefault.buf, R_OK)) x509ca.setDefaultStr(strdup(caDefault.buf)); else vlog.error("Failed to open ~/.vnc/x509_certs"); +#else + /* Windows doesn't have access() function. */ + x509ca.setDefaultStr(strdup(caDefault.buf)); +#endif } void CSecurityTLS::shutdown() |