diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-13 10:43:37 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-13 10:43:37 -0500 |
commit | 9f47df12110b1cfd13b4057820b0788649160427 (patch) | |
tree | ecac51019e254b2a60ccd54854b95f7009dd8755 /src/c | |
parent | f769377366c0ece0caa31e4d09179f4c9669660c (diff) | |
parent | 5ca6148aaf7b930a8868d0543f1a307d40532243 (diff) |
Merge branch 'dfsg_clean'
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/openssl.c | 11 | ||||
-rw-r--r-- | src/c/urweb.c | 7 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/c/openssl.c b/src/c/openssl.c index 981d48da..15c4de5e 100644 --- a/src/c/openssl.c +++ b/src/c/openssl.c @@ -35,14 +35,15 @@ static void random_password() { // OpenSSL callbacks #ifdef PTHREAD_T_IS_POINTER -# define CRYPTO_THREADID_SET CRYPTO_THREADID_set_pointer +static void thread_id(CRYPTO_THREADID *const result) { + CRYPTO_THREADID_set_pointer(result, pthread_self()); +} #else -# define CRYPTO_THREADID_SET CRYPTO_THREADID_set_numeric -#endif static void thread_id(CRYPTO_THREADID *const result) { - CRYPTO_THREADID_SET(result, pthread_self()); + CRYPTO_THREADID_set_numeric(result, (unsigned long)pthread_self()); } -#undef CRYPTO_THREADID_SET +#endif + static void lock_or_unlock(const int mode, const int type, const char *file, const int line) { pthread_mutex_t *const lock = &openssl_locks[type]; diff --git a/src/c/urweb.c b/src/c/urweb.c index 50aac5e8..c057688c 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -4562,13 +4562,6 @@ void uw_set_remoteSock(uw_context ctx, int sock) { // Sqlcache -typedef struct uw_Sqlcache_Entry { - char *key; - uw_Sqlcache_Value *value; - unsigned long timeInvalid; - UT_hash_handle hh; -} uw_Sqlcache_Entry; - static void uw_Sqlcache_freeValue(uw_Sqlcache_Value *value) { if (value) { free(value->result); |