• Simon McVittie's avatar
    build: Never use poll() on Darwin family (macOS, etc.) or Interix · 6cb51b22
    Simon McVittie authored
    Doing a runtime check in configure.ac (AC_RUN_IFELSE) has several
    disadvantages:
    
    * It doesn't work when cross-compiling. For example, if we build macOS
      binaries on a Linux system, we'd assume that poll() works, but in
      fact it won't.
    
    * It checks the build system capabilities, but that is not necessarily
      appropriate if (for example) a macOS 10.10 user builds binaries that
      could be used by macOS 10.12 or macOS 10.9 users.
    
    * It checks for one specific failure mode, but macOS seems to have a
      history of various implementation issues in poll().
    
    * If we want it to work in CMake, we have to duplicate it in the CMake
      build system.
    
    None of these is a showstopper on its own, but the combination of all
    of them makes the current approach to avoiding the broken poll() on
    macOS look unreliable. libcurl, a widely-portable library making
    extensive use of sockets, specifically doesn't use poll() on Darwin
    (macOS, iOS, etc.) or on Interix; let's follow their example here.
    
    See also https://bugzilla.gnome.org/show_bug.cgi?id=302672 and
    https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/
    for some relevant history.
    Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
    Resolves: #232
    (cherry picked from commit 0414ea65)
    6cb51b22
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile.am Loading commit data...
Version.in Loading commit data...
dbus-address.c Loading commit data...
dbus-address.h Loading commit data...
dbus-arch-deps.h.in Loading commit data...
dbus-asv-util.c Loading commit data...
dbus-asv-util.h Loading commit data...
dbus-auth-script.c Loading commit data...
dbus-auth-script.h Loading commit data...
dbus-auth-util.c Loading commit data...
dbus-auth.c Loading commit data...
dbus-auth.h Loading commit data...
dbus-bus.c Loading commit data...
dbus-bus.h Loading commit data...
dbus-connection-internal.h Loading commit data...
dbus-connection.c Loading commit data...
dbus-connection.h Loading commit data...
dbus-credentials-util.c Loading commit data...
dbus-credentials.c Loading commit data...
dbus-credentials.h Loading commit data...
dbus-dataslot.c Loading commit data...
dbus-dataslot.h Loading commit data...
dbus-errors.c Loading commit data...
dbus-errors.h Loading commit data...
dbus-file-unix.c Loading commit data...
dbus-file-win.c Loading commit data...
dbus-file.c Loading commit data...
dbus-file.h Loading commit data...
dbus-hash.c Loading commit data...
dbus-hash.h Loading commit data...
dbus-init-win.cpp Loading commit data...
dbus-internals.c Loading commit data...
dbus-internals.h Loading commit data...
dbus-keyring.c Loading commit data...
dbus-keyring.h Loading commit data...
dbus-list.c Loading commit data...
dbus-list.h Loading commit data...
dbus-macros.h Loading commit data...
dbus-mainloop.c Loading commit data...
dbus-mainloop.h Loading commit data...
dbus-marshal-basic.c Loading commit data...
dbus-marshal-basic.h Loading commit data...
dbus-marshal-byteswap-util.c Loading commit data...
dbus-marshal-byteswap.c Loading commit data...
dbus-marshal-byteswap.h Loading commit data...
dbus-marshal-header.c Loading commit data...
dbus-marshal-header.h Loading commit data...
dbus-marshal-recursive-util.c Loading commit data...
dbus-marshal-recursive.c Loading commit data...
dbus-marshal-recursive.h Loading commit data...
dbus-marshal-validate-util.c Loading commit data...
dbus-marshal-validate.c Loading commit data...
dbus-marshal-validate.h Loading commit data...
dbus-memory.c Loading commit data...
dbus-memory.h Loading commit data...
dbus-mempool.c Loading commit data...
dbus-mempool.h Loading commit data...
dbus-message-factory.c Loading commit data...
dbus-message-factory.h Loading commit data...
dbus-message-internal.h Loading commit data...
dbus-message-private.h Loading commit data...
dbus-message-util.c Loading commit data...
dbus-message.c Loading commit data...
dbus-message.h Loading commit data...
dbus-misc.c Loading commit data...
dbus-misc.h Loading commit data...
dbus-nonce.c Loading commit data...
dbus-nonce.h Loading commit data...
dbus-object-tree.c Loading commit data...
dbus-object-tree.h Loading commit data...
dbus-pending-call-internal.h Loading commit data...
dbus-pending-call.c Loading commit data...
dbus-pending-call.h Loading commit data...
dbus-pipe-unix.c Loading commit data...
dbus-pipe-win.c Loading commit data...
dbus-pipe.c Loading commit data...
dbus-pipe.h Loading commit data...
dbus-protocol.h Loading commit data...
dbus-resources.c Loading commit data...
dbus-resources.h Loading commit data...
dbus-server-debug-pipe.c Loading commit data...
dbus-server-debug-pipe.h Loading commit data...
dbus-server-launchd.c Loading commit data...
dbus-server-launchd.h Loading commit data...
dbus-server-protected.h Loading commit data...
dbus-server-socket.c Loading commit data...
dbus-server-socket.h Loading commit data...
dbus-server-unix.c Loading commit data...
dbus-server-unix.h Loading commit data...
dbus-server-win.c Loading commit data...
dbus-server-win.h Loading commit data...
dbus-server.c Loading commit data...
dbus-server.h Loading commit data...
dbus-sha.c Loading commit data...
dbus-sha.h Loading commit data...
dbus-shared.h Loading commit data...
dbus-shell.c Loading commit data...
dbus-shell.h Loading commit data...
dbus-signature.c Loading commit data...
dbus-signature.h Loading commit data...
dbus-socket-set-epoll.c Loading commit data...
dbus-socket-set-poll.c Loading commit data...
dbus-socket-set.c Loading commit data...
dbus-socket-set.h Loading commit data...
dbus-sockets-win.h Loading commit data...
dbus-spawn-test.c Loading commit data...
dbus-spawn-win.c Loading commit data...
dbus-spawn.c Loading commit data...
dbus-spawn.h Loading commit data...
dbus-string-private.h Loading commit data...
dbus-string-util.c Loading commit data...
dbus-string.c Loading commit data...
dbus-string.h Loading commit data...
dbus-syntax.c Loading commit data...
dbus-syntax.h Loading commit data...
dbus-sysdeps-pthread.c Loading commit data...
dbus-sysdeps-thread-win.c Loading commit data...
dbus-sysdeps-unix.c Loading commit data...
dbus-sysdeps-unix.h Loading commit data...
dbus-sysdeps-util-unix.c Loading commit data...
dbus-sysdeps-util-win.c Loading commit data...
dbus-sysdeps-util.c Loading commit data...
dbus-sysdeps-win.c Loading commit data...
dbus-sysdeps-win.h Loading commit data...
dbus-sysdeps-wince-glue.c Loading commit data...
dbus-sysdeps-wince-glue.h Loading commit data...
dbus-sysdeps.c Loading commit data...
dbus-sysdeps.h Loading commit data...
dbus-test-main.c Loading commit data...
dbus-test.c Loading commit data...
dbus-test.h Loading commit data...
dbus-threads-internal.h Loading commit data...
dbus-threads.c Loading commit data...
dbus-threads.h Loading commit data...
dbus-timeout.c Loading commit data...
dbus-timeout.h Loading commit data...
dbus-transport-protected.h Loading commit data...
dbus-transport-socket.c Loading commit data...
dbus-transport-socket.h Loading commit data...
dbus-transport-unix.c Loading commit data...
dbus-transport-unix.h Loading commit data...
dbus-transport-win.c Loading commit data...
dbus-transport-win.h Loading commit data...
dbus-transport.c Loading commit data...
dbus-transport.h Loading commit data...
dbus-types.h Loading commit data...
dbus-userdb-util.c Loading commit data...
dbus-userdb.c Loading commit data...
dbus-userdb.h Loading commit data...
dbus-uuidgen.c Loading commit data...
dbus-uuidgen.h Loading commit data...
dbus-valgrind-internal.h Loading commit data...
dbus-watch.c Loading commit data...
dbus-watch.h Loading commit data...
dbus.h Loading commit data...
versioninfo.rc.in Loading commit data...