summaryrefslogtreecommitdiffstats
path: root/libvncclient/tls_openssl.c
Commit message (Collapse)AuthorAgeFilesLines
* tls_openssl.c: enable extra POSIX functionality to get PTHREAD_MUTEX_RECURSIVEFloris Bos2015-01-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems pthread_mutexattr_settype() and PTHREAD_MUTEX_RECURSIVE are not available by default. Either _XOPEN_SOURCE or _POSIX_C_SOURCE needs to be set to to the right level before including any system include file in order to have them exposed. Fixes the following compile error: == tls_openssl.c: In function 'dyn_create_function': tls_openssl.c:91:2: warning: implicit declaration of function 'pthread_mutexattr_settype' [-Wimplicit-function-declaration] MUTEX_INIT(value->mutex); ^ tls_openssl.c:42:40: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function) pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE);\ ^ tls_openssl.c:91:2: note: in expansion of macro 'MUTEX_INIT' MUTEX_INIT(value->mutex); ^ tls_openssl.c:42:40: note: each undeclared identifier is reported only once for each function it appears in pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE);\ ^ tls_openssl.c:91:2: note: in expansion of macro 'MUTEX_INIT' MUTEX_INIT(value->mutex); ^ tls_openssl.c: In function 'InitializeTLS': tls_openssl.c:42:40: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function) pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE);\ ^ tls_openssl.c:156:5: note: in expansion of macro 'MUTEX_INIT' MUTEX_INIT(mutex_buf[i]); ^ tls_openssl.c: In function 'ssl_verify': tls_openssl.c:177:7: warning: variable 'err' set but not used [-Wunused-but-set-variable] int err, i; ^ tls_openssl.c:176:14: warning: variable 'client' set but not used [-Wunused-but-set-variable] rfbClient *client; ^ make[3]: *** [tls_openssl.lo] Error 1 == Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
* Fix tv_usec calculationJohannes Schindelin2014-09-021-1/+1
| | | | | | This bug was introduced in the MSVC patches. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Use Windows' critical sections to emulate pthread's mutexesDaniel Cohen Gindi2014-09-021-13/+36
| | | | | | | | | | | With Microsoft Visual C++, we cannot use pthreads (MinGW sports an emulation library which is the reason we did not need Windows-specific hacks earlier). Happily, it is very easy to provide Windows-specific emulations for the pthread calls we use. [JES: fixed commit message] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* MSVC: Use the Unix emulation headersDaniel Cohen Gindi2014-09-021-1/+7
| | | | | | [JES: provided commit message, split out unrelated changes] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* MSVC: Use _snprintf instead of snprintfDaniel Cohen Gindi2014-09-021-0/+4
| | | | | | | | | In Microsoft's Visual C runtime, the snprintf() function is actually called _snprintf. Let's just #define the former to call the latter. [JES: fixed commit message] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Remove unused variablesDaniel Cohen Gindi2014-09-021-7/+0
| | | | | | | | | This change is technically not required to support MSVC, but it was detected by Microsoft's compiler. [JES: fixed commit message] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Fix in milliseconds to struct timeval conversionRostislav Lisovy2012-07-201-1/+1
| | | | | Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* LibVNCClient: properly free the openssl session stuff on shutdown.Christian Beier2012-04-151-13/+14
|
* Add the OpenSSL libvncclient TLS version to the build system.Christian Beier2012-04-141-0/+586