multipath-tools: libmultipath: fix gcc link failure on rcu_register_thread_mb.
authorGris Ge <fge@redhat.com>
Fri, 20 Jan 2017 13:38:58 +0000 (21:38 +0800)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 10 Feb 2017 11:33:35 +0000 (12:33 +0100)
Error:
    ../libmultipath/libmultipath.so: undefined reference to
    `rcu_register_thread_mb'
    ../libmultipath/libmultipath.so: undefined reference to
    `rcu_unregister_thread_mb'

Fix:
    Link the libmultipath with -lurcu

Signed-off-by: Gris Ge <fge@redhat.com>
libmultipath/Makefile

index b5d54d8..1f5ec25 100644 (file)
@@ -9,7 +9,7 @@ LIBS = $(DEVLIB).$(SONAME)
 
 CFLAGS += -I$(mpathcmddir)
 
-LIBDEPS += -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) -lmpathcmd
+LIBDEPS += -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) -lmpathcmd -lurcu
 
 ifdef SYSTEMD
        CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)