summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-11-15 08:25:52 -0800
committerBen Pfaff <blp@ovn.org>2018-11-19 12:28:38 -0800
commit7ab4b06537842c0e0de85146b85df52ca189b6d3 (patch)
treec1f5c13fe51483e63f87868aa99d49ef9439396c /configure.ac
parent024d93f62ca7a7fef9c8fc5f69a38b60ebf7e0ab (diff)
downloadopenvswitch-7ab4b06537842c0e0de85146b85df52ca189b6d3.tar.gz
configure: Check for more specific function to pull in pthread library.
On my laptop, pthread_create() is always available without -lpthread, but when I use -fsanitize=address, -lpthread is required to pull in other threading functions such as pthread_rwlock_tryrdlock(). Thus, with -fsanitize=address I have to manually add -lpthread to link commands one way or another. This commit avoids that problem by checking for a function that is sometimes only available in -lpthread. Tested-by: Yifeng Sun <pkusunyifeng@gmail.com> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index bb726f89e..3e97a750c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,7 +77,7 @@ AC_SUBST([LT_AGE])
AC_SEARCH_LIBS([pow], [m])
AC_SEARCH_LIBS([clock_gettime], [rt])
AC_SEARCH_LIBS([timer_create], [rt])
-AC_SEARCH_LIBS([pthread_create], [pthread])
+AC_SEARCH_LIBS([pthread_rwlock_tryrdlock], [pthread])
AC_FUNC_STRERROR_R
OVS_CHECK_ESX