merged thanks for the patch! On Sat, 2008-12-06 at 16:57 +0000, Alex Bligh wrote: > Current trunk corosync will not compile on Linux (Debian stable), and > possibly not other POSIX platforms (errors below) > > Problems > * pthreads.h does not declare pthread_spin_lock unless _XOPEN_SOURCE=600 > or similar is defined. > * FD_SET etc. should (per POSIX.1-2001) be got from sys/select.h; one > cannot rely on sys/time.h, sys/types.h, unistd.h > > I think the attached is reasonably portable but it is possible _XOPEN_SOURCE > should be declared on more than just Linux. > > Patch against trunk attached. > > Alex > > > > cc -DLCRSODIR='"/usr/libexec/lcrso"' -O3 -Wall -DCOROSYNC_LINUX > -I/home/amb/openais/trunk/corosync/trunk/include > -I/home/amb/openais/trunk/corosync/trunk/exec/ -fPIC -c -o logsys.o > logsys.c > logsys.c:114: error: expected '=', ',', ';', 'asm' or '__attribute__' > before 'logsys_idx_spinlock' > logsys.c: In function 'records_reclaim': > logsys.c:176: warning: implicit declaration of function 'pthread_spin_lock' > logsys.c:176: error: 'logsys_idx_spinlock' undeclared (first use in this > function) > logsys.c:176: error: (Each undeclared identifier is reported only once > logsys.c:176: error: for each function it appears in.) > logsys.c:205: warning: implicit declaration of function > 'pthread_spin_unlock' > logsys.c: In function 'logsys_worker_thread': > logsys.c:454: error: 'logsys_idx_spinlock' undeclared (first use in this > function) > logsys.c: In function '_logsys_rec_init': > logsys.c:567: warning: implicit declaration of function 'pthread_spin_init' > logsys.c:567: error: 'logsys_idx_spinlock' undeclared (first use in this > function) > logsys.c: In function '_logsys_log_rec': > logsys.c:727: error: 'logsys_idx_spinlock' undeclared (first use in this > function) > > cc -DLCRSODIR='"/usr/libexec/lcrso"' -O3 -Wall -DCOROSYNC_LINUX > -D_XOPEN_SOURCE=600 -I/home/amb/openais/trunk/corosync/trunk/include > -I/home/amb/openais/trunk/corosync/trunk/tools/ > -I/home/amb/openais/trunk/corosync/trunk/include -c -o corosync-objctl.o > corosync-objctl.c > corosync-objctl.c: In function 'listen_for_object_changes': > corosync-objctl.c:451: error: 'fd_set' undeclared (first use in this > function) > corosync-objctl.c:451: error: (Each undeclared identifier is reported only > once > corosync-objctl.c:451: error: for each function it appears in.) > corosync-objctl.c:451: error: expected ';' before 'read_fds' > corosync-objctl.c:455: warning: implicit declaration of function 'FD_ZERO' > corosync-objctl.c:455: error: 'read_fds' undeclared (first use in this > function) > corosync-objctl.c:462: warning: implicit declaration of function 'FD_SET' > corosync-objctl.c:464: warning: implicit declaration of function 'select' > corosync-objctl.c:468: warning: implicit declaration of function 'FD_ISSET' > _______________________________________________ > Openais mailing list > [email protected] > https://lists.linux-foundation.org/mailman/listinfo/openais
_______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
