]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: fix shctx build on older compilers
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Oct 2012 13:11:52 +0000 (15:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Oct 2012 17:03:00 +0000 (19:03 +0200)
gcc < 3 breaks on shctx because of the missing arg in the lock macros.
We don't need the arg at all, it's not used.

src/shctx.c

index b8bfd4a49aa3b43f43238022efb3b74291ea03c3..0db443decb1e8dfe9d70e25ed445c84e80ae7add 100644 (file)
@@ -62,8 +62,8 @@ static void (*shared_session_new_cbk)(unsigned char *session, unsigned int sessi
 
 /* Lock functions */
 #ifdef USE_PRIVATE_CACHE
-#define shared_context_lock(v)
-#define shared_context_unlock(v)
+#define shared_context_lock()
+#define shared_context_unlock()
 
 #else
 #ifdef USE_SYSCALL_FUTEX
@@ -141,15 +141,15 @@ static inline void _shared_context_unlock(void)
        }
 }
 
-#define shared_context_lock(v)   if (use_shared_mem) _shared_context_lock()
+#define shared_context_lock()   if (use_shared_mem) _shared_context_lock()
 
-#define shared_context_unlock(v) if (use_shared_mem) _shared_context_unlock()
+#define shared_context_unlock() if (use_shared_mem) _shared_context_unlock()
 
 #else /* USE_SYSCALL_FUTEX */
 
-#define shared_context_lock(v)   if (use_shared_mem) pthread_mutex_lock(&shctx->mutex)
+#define shared_context_lock()   if (use_shared_mem) pthread_mutex_lock(&shctx->mutex)
 
-#define shared_context_unlock(v) if (use_shared_mem) pthread_mutex_unlock(&shctx->mutex)
+#define shared_context_unlock() if (use_shared_mem) pthread_mutex_unlock(&shctx->mutex)
 
 #endif
 #endif