On 09/28/2010 10:18 AM, Eric Blake wrote:
gcc -Wall -Wformat -Wmissing-prototypes -Wnested-externs -Wpointer-
arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,- D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables -g -O2 - o .libs/event-test
event_test-event-test.o -L/opt/local/lib ../../../
src/.libs/libvirt.dylib -L/usr/lib /usr/lib/libxml2.dylib -licucore -
lm /opt/local/lib/libgnutls.dylib /opt/local/lib/libtasn1.dylib -lz /
opt/local/lib/libgcrypt.dylib /opt/local/lib/libgpg-error.dylib -
lpthread /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc

Aha - I just realized the problem. The Makefile.am fails to link against
the gnulib library that provides rpl_poll, even though the headers are
pulling in the replacement definition.

There _is_ a gnulib issue, though:

The gnulib module poll replaces both the <poll.h> system header and the poll(2) system call; but when it replaces the system call, it does so via a define to rpl_poll directly in <config.h> which is an older style, rather than the modern-day style of replacing things in the gnulib replacement <poll.h>. Furthermore, modern style favors splitting replacement headers into separate modules from like-named functions (that is, we need a new module poll-h if you want a working poll.h [pollfd, nfds_t, and the various POLL macros] that can be used for GNULIB_POSIXCHECK conformance and when you don't tickle the portability limitations of native poll(); and poll [which depends on poll-h] if you also need the gnulib fixes for the function).

--
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to