Signed-off-by: Jan Friesse jfriesse@redhat.com --- configure.ac | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac index c0a869f..bf56887 100644 --- a/configure.ac +++ b/configure.ac @@ -251,6 +251,10 @@ case "$host_os" in AC_DEFINE_UNQUOTED([QB_FREEBSD_GE_8], [1], [Compiling for FreeBSD >= 8 platform]) ;; + *netbsd*) + AC_DEFINE_UNQUOTED([_SEM_SEMUN_UNDEFINED], [1], + [The semun structure is undefined]) + ;; esac AC_MSG_RESULT([BSD]) ;;
Signed-off-by: Jan Friesse jfriesse@redhat.com --- lib/rpl_sem.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/rpl_sem.c b/lib/rpl_sem.c index cdc005c..0b6a301 100644 --- a/lib/rpl_sem.c +++ b/lib/rpl_sem.c @@ -34,6 +34,7 @@ rpl_sem_init(rpl_sem_t * sem, int pshared, unsigned int count)
(void)pthread_mutexattr_init(&mattr); (void)pthread_condattr_init(&cattr); +#if defined(DISABLE_POSIX_THREAD_PROCESS_SHARED) if (pshared) { rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED); if (rc != 0) { @@ -44,6 +45,7 @@ rpl_sem_init(rpl_sem_t * sem, int pshared, unsigned int count) goto cleanup; } } +#endif rc = pthread_mutex_init(&sem->mutex, &mattr); if (rc != 0) { goto cleanup;
On 03/04/12 11:49 +0200, Jan Friesse wrote:
Signed-off-by: Jan Friesse jfriesse@redhat.com
lib/rpl_sem.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/rpl_sem.c b/lib/rpl_sem.c index cdc005c..0b6a301 100644 --- a/lib/rpl_sem.c +++ b/lib/rpl_sem.c @@ -34,6 +34,7 @@ rpl_sem_init(rpl_sem_t * sem, int pshared, unsigned int count)
(void)pthread_mutexattr_init(&mattr); (void)pthread_condattr_init(&cattr); +#if defined(DISABLE_POSIX_THREAD_PROCESS_SHARED)
Shouldn't this be if not defined? Double negative:(
if (pshared) { rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED); if (rc != 0) { @@ -44,6 +45,7 @@ rpl_sem_init(rpl_sem_t * sem, int pshared, unsigned int count) goto cleanup; } } +#endif rc = pthread_mutex_init(&sem->mutex, &mattr); if (rc != 0) { goto cleanup; -- 1.7.7.2
quarterback-devel mailing list quarterback-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/quarterback-devel
Signed-off-by: Jan Friesse jfriesse@redhat.com --- examples/tcpclient.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/examples/tcpclient.c b/examples/tcpclient.c index 67e2487..b4bb33e 100644 --- a/examples/tcpclient.c +++ b/examples/tcpclient.c @@ -19,6 +19,8 @@ * along with libqb. If not, see http://www.gnu.org/licenses/. */ #include "os_base.h" + +#include <arpa/inet.h> #include <netdb.h>
Signed-off-by: Jan Friesse jfriesse@redhat.com --- configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac index bf56887..f10834a 100644 --- a/configure.ac +++ b/configure.ac @@ -144,7 +144,7 @@ AC_CHECK_FUNCS([alarm clock_gettime ftruncate gettimeofday localtime localtime_r memset munmap socket strchr strrchr strdup strerror strstr \ poll epoll_create epoll_create1 random rand getrlimit sysconf \ pthread_spin_lock pthread_setschedparam sem_timedwait semtimedop \ - sched_get_priority_max sched_setscheduler]) + sched_get_priority_max sched_setscheduler getpeerucred getpeereid])
AM_CONDITIONAL(HAVE_SEM_TIMEDWAIT, [test "x$ac_cv_func_sem_timedwait" = xyes])
quarterback-devel@lists.fedorahosted.org