]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix rwlock_test unittest bug #2449
authorCarsten Leonhardt <leo@debian.org>
Tue, 29 Jan 2019 15:29:07 +0000 (16:29 +0100)
committerKern Sibbald <kern@sibbald.com>
Tue, 29 Jan 2019 15:29:07 +0000 (16:29 +0100)
     Only call thr_setconcurrency if it's available.
     Fix order of linking and installation.

bacula/src/lib/Makefile.in
bacula/src/lib/rwlock.c

index 8c4796ea178c966e1b9cc7deee18cb832368f58d..a73cd9aa05c8150c52cff9f855fc4e6369db2a4c 100644 (file)
@@ -185,8 +185,8 @@ workq_test: Makefile workq.c
 rwlock_test: Makefile rwlock.c
        $(RMF) rwlock.o
        $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE)  $(CFLAGS) rwlock.c
-       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $@ $(DESTDIR)$(sbindir)/
        $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(DLIB) -lbac -lm $(LIBS) $(OPENSSL_LIBS)
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $@ $(DESTDIR)$(sbindir)/
        $(RMF) rwlock.o
        $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
 
index 539751192668333cfc693e44ca8d856e03f9efd6..cad04b4c17a8825cd17bb03f2fd02ef920cc287a 100644 (file)
@@ -445,7 +445,10 @@ int main (int argc, char *argv[])
      * For Solaris 2.5,2.6,7 and 8 threads are not timesliced.
      * Ensure our threads can run concurrently.
      */
+
+#ifdef USE_THR_SETCONCURRENCY
     thr_setconcurrency(THREADS);      /* Only implemented on Solaris */
+#endif
 
     /*
      * Initialize the shared data.