From: Hallvard Furuseth Date: Fri, 9 Mar 2012 18:30:34 +0000 (+0100) Subject: Fix MDB_txninfo.mt2 padding on Windows/Apple X-Git-Tag: OPENLDAP_REL_ENG_2_4_32~125^2~31 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c7da506dd2c8d3b8a2b209a26afbcb2ff94db13c;p=openldap Fix MDB_txninfo.mt2 padding on Windows/Apple --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 4e3d70dc13..b714119c10 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -202,6 +202,8 @@ #if defined(_WIN32) || defined(__APPLE__) #define MNAME_LEN 32 +#else +#define MNAME_LEN (sizeof(pthread_mutex_t)) #endif /** @} */ @@ -543,7 +545,7 @@ typedef struct MDB_txninfo { pthread_mutex_t mt2_wmutex; #define mti_wmutex mt2.mt2_wmutex #endif - char pad[(sizeof(pthread_mutex_t)+CACHELINE-1) & ~(CACHELINE-1)]; + char pad[(MNAME_LEN+CACHELINE-1) & ~(CACHELINE-1)]; } mt2; MDB_reader mti_readers[1]; } MDB_txninfo;