]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
OpenBSD: libpthreads requires OpenBSD 5.2 or later
authorStuart Henderson <sthen@openbsd.org>
Thu, 18 Apr 2013 05:29:31 +0000 (23:29 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 18 Apr 2013 05:29:31 +0000 (23:29 -0600)
This patch imported from the OpenBSD ports packaging implements a TODO in
DiskThreads component regarding wider system support for libpthreads.

configure.ac

index 043207dcdf976b7eafa4c11cb00d9347d1b19542..44be485db9e5ce9d6e117df8d3556d7da9331c95 100644 (file)
@@ -590,6 +590,16 @@ for module in $squid_disk_module_candidates none; do
               fi
             fi
             ;;
+          openbsd)
+            if test `echo "$squid_host_os_version" | tr -d .` -lt 52 ; then
+                AC_MSG_NOTICE(pthread library requires OpenBSD 5.2 or later)
+                squid_opt_use_diskthreads="no"
+            else
+              SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT"
+              SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT"
+              LDFLAGS="$LDFLAGS -lpthread"
+            fi
+            ;;
           solaris)
             if test "x$GCC" = "xyes" ; then
               SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT -pthreads"