• 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
bus Loading commit data...
cmake Loading commit data...
dbus Loading commit data...
doc Loading commit data...
m4 Loading commit data...
test Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
ChangeLog.pre-1-0 Loading commit data...
ChangeLog.pre-1-2 Loading commit data...
Doxyfile.in Loading commit data...
HACKING Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
NEWS.pre-1-0 Loading commit data...
NEWS.pre-1-2 Loading commit data...
README Loading commit data...
README.cmake Loading commit data...
README.cygwin Loading commit data...
README.launchd Loading commit data...
README.valgrind Loading commit data...
README.win Loading commit data...
README.wince Loading commit data...
autogen.sh Loading commit data...
cleanup-man-pages.sh Loading commit data...
configure.ac Loading commit data...
dbus-1-uninstalled.pc.in Loading commit data...
dbus-1.pc.in Loading commit data...