mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-29 15:50:31 +01:00
cmake: Fix definition of DBUS_USE_SYNC
dbus-sysdeps-unix.c checks for DBUS_USE_SYNC using 0/1 checks not defined
checks, so we should be using #cmakedefine01. This fixes lots of -Wundef
warnings when compiling for FreeBSD and ensures that we actually use
atomics instead of the pthread fallback there.
(cherry picked from commit b932c343c4)
Backported-from: dbus!306
This commit is contained in:
parent
9e8fe0718c
commit
9cf3b0810f
2 changed files with 2 additions and 2 deletions
|
|
@ -137,7 +137,7 @@ CHECK_C_SOURCE_COMPILES("
|
|||
int main() {
|
||||
int a = 4;
|
||||
int b = __sync_sub_and_fetch(&a, 4);
|
||||
exit(b);
|
||||
return b;
|
||||
}
|
||||
" DBUS_USE_SYNC)
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@
|
|||
#cmakedefine DBUS_HAVE_LINUX_EPOLL 1
|
||||
|
||||
/* Use the gcc __sync extension */
|
||||
#cmakedefine DBUS_USE_SYNC 1
|
||||
#cmakedefine01 DBUS_USE_SYNC
|
||||
#cmakedefine HAVE_VASPRINTF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue