diff --git a/src/template/osf b/src/template/osf
index c2af2350e89a91c43f7b8a303124b295e248ca99..9d2d6b81c1c4c5305556d6c44d15de20b5482cb4 100644
--- a/src/template/osf
+++ b/src/template/osf
@@ -5,4 +5,8 @@ fi
 
 THREAD_SUPPORT=yes
 NEED_REENTRANT_FUNCS=no		# 4.0 2003-09-13
-THREAD_LIBS="-pthread"
+if test "$GCC" = yes
+then	THREAD_LIBS="-pthread"
+else	THREAD_CPPFLAGS="-pthread"
+	THREAD_LIBS="-lpthread"
+fi