mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
build: Use #ifdef to check for #defines
for example, in case HAVE_MEMFD is #undef, checking with #if HAVE_MEMFD gives a warning (gcc 5.4.1, Ubuntu) pulsecore/shm.c: In function 'sharedmem_create': pulsecore/shm.c:208:5: warning: "HAVE_MEMFD" is not defined [-Wundef] #if HAVE_MEMFD use #ifdef or #if defined() to check for presence of a #define Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
This commit is contained in:
parent
48ba5e4957
commit
a199b9045e
4 changed files with 8 additions and 8 deletions
|
|
@ -220,7 +220,7 @@ static void io_event_cb(pa_mainloop_api *mainloop, pa_io_event *e, int fd, pa_io
|
|||
unsigned int flags = 0;
|
||||
DBusWatch *watch = userdata;
|
||||
|
||||
#if HAVE_DBUS_WATCH_GET_UNIX_FD
|
||||
#ifdef HAVE_DBUS_WATCH_GET_UNIX_FD
|
||||
pa_assert(fd == dbus_watch_get_unix_fd(watch));
|
||||
#else
|
||||
pa_assert(fd == dbus_watch_get_fd(watch));
|
||||
|
|
@ -291,7 +291,7 @@ static dbus_bool_t watch_add_cb(DBusWatch *watch, void *data) {
|
|||
|
||||
ev = mainloop->io_new(
|
||||
mainloop,
|
||||
#if HAVE_DBUS_WATCH_GET_UNIX_FD
|
||||
#ifdef HAVE_DBUS_WATCH_GET_UNIX_FD
|
||||
dbus_watch_get_unix_fd(watch),
|
||||
#else
|
||||
dbus_watch_get_fd(watch),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue