Index: multipath-tools/multipath/Makefile =================================================================== --- multipath-tools.orig/multipath/Makefile +++ multipath-tools/multipath/Makefile @@ -7,7 +7,7 @@ include ../Makefile.inc OBJS = main.o CFLAGS += -I$(multipathdir) -LDFLAGS += -lpthread -ldevmapper -laio -ldl \ +LDFLAGS += -lpthread -ldevmapper -Wl,-Bstatic,-laio,-Bdynamic -ldl \ -lmultipath -L$(multipathdir) EXEC = multipath @@ -15,7 +15,7 @@ EXEC = multipath all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) -Wl,-undefined=io_submit,-undefined=io_getevents,-undefined=io_destroy,-undefined=io_setup $(LDFLAGS) -rdynamic $(GZIP) $(EXEC).8 > $(EXEC).8.gz $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz