You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
atomic.h: Rename gettid() -> mdbm_gettid() to avoid conflicts (#11)
* atomic.h: Rename gettid() -> mdbm_gettid() to avoid conflicts
Recent versions of glibc contain a gettid syscall wrapper, starting
with 2.30. This causes the following compile error on anything that
includes it, such as Ubuntu LTS 20.04. Rename the function to fix it.
This should also return a int32_t instead of uint32_t to match the
actual kernel and glibc definitions.
In file included from mdbm.c:47:
atomic.h:102:24: error: conflicting types for 'gettid'
102 | static inline uint32_t gettid() {
| ^~~~~~
In file included from /usr/include/unistd.h:1170,
from mdbm.c:29:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of 'gettid' was here
34 | extern __pid_t gettid (void) __THROW;
| ^~~~~~
* Add missing rename (OOPS)
0 commit comments