Fix threadlibs tool to output '-lpthread' for DragonFly
authorIvan Maidanski <ivmai@mail.ru>
Wed, 17 Jan 2018 08:43:09 +0000 (11:43 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 17 Jan 2018 08:55:45 +0000 (11:55 +0300)
* tools/threadlibs.c [GC_FREEBSD_THREADS && (__DragonFly__
|| !__FREEBSD_version)] (main): Print "-lpthread" (as well as for
__FREEBSD_version >= 500000).

tools/threadlibs.c

index 879eda7..d3ef925 100644 (file)
@@ -42,10 +42,10 @@ int main(void)
 #       ifdef GC_USE_DLOPEN_WRAP
           printf("-ldl ");
 #       endif
-#       if (__FREEBSD_version >= 500000)
-          printf("-lpthread\n");
-#       else
+#       if (__FREEBSD_version < 500000)
           printf("-pthread\n");
+#       else /* __FREEBSD__ || __DragonFly__ */
+          printf("-lpthread\n");
 #       endif
 #   endif
 #   if defined(GC_NETBSD_THREADS)