From 2de2bc908b4041a0b1d370d431255816d0766d19 Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Mon, 12 Dec 2011 20:29:09 -0600 Subject: [PATCH] Try for sem_open a second time, adding -lpthread. --- ext/libpsem/extconf.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/libpsem/extconf.rb b/ext/libpsem/extconf.rb index 6a74e66..b44be85 100644 --- a/ext/libpsem/extconf.rb +++ b/ext/libpsem/extconf.rb @@ -3,7 +3,8 @@ require 'mkmf' $objs = [] # posix semaphores -if have_func('sem_open', 'semaphore.h') +if have_func('sem_open', 'semaphore.h') || + ($libs << '-lpthread' && have_func('sem_open', 'semaphore.h')) have_func('floorf', 'math.h') or abort("Missing required floorf() in math.h") have_library('m', 'floorf')