1
0
multipath-tools/multipath-tools-link-directio-against-libaio

75 lines
2.1 KiB
Plaintext

From 2fb0035d2322771bd9753e26a2a1c5babbfc2abc Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 30 Oct 2008 16:49:50 +0100
Subject: [PATCH] Link directio checker against libaio
The directio checker has to link against libaio explicitely,
otherwise any versioning information is lost.
References: 433659
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/checkers/Makefile | 3 +++
libmultipath/checkers/directio.c | 2 +-
multipath/Makefile | 2 +-
multipathd/Makefile | 2 +-
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile
index a20dfac..99b3dc2 100644
--- a/libmultipath/checkers/Makefile
+++ b/libmultipath/checkers/Makefile
@@ -17,6 +17,9 @@ CFLAGS += -I..
all: $(LIBS)
+libcheckdirectio.so: directio.o
+ $(CC) $(SHARED_FLAGS) -o $@ $^ -laio
+
libcheck%.so: libsg.o %.o
$(CC) $(SHARED_FLAGS) -o $@ $^
diff --git a/libmultipath/checkers/directio.c b/libmultipath/checkers/directio.c
index 5c92dac..c701609 100644
--- a/libmultipath/checkers/directio.c
+++ b/libmultipath/checkers/directio.c
@@ -13,7 +13,7 @@
#include <linux/fs.h>
#include <errno.h>
#include <linux/kdev_t.h>
-#include <asm/unistd.h>
+#include <unistd.h>
#include <libaio.h>
#include "checkers.h"
diff --git a/multipath/Makefile b/multipath/Makefile
index 75d4ddf..a02107b 100644
--- a/multipath/Makefile
+++ b/multipath/Makefile
@@ -7,7 +7,7 @@ include ../Makefile.inc
OBJS = main.o
CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
-LDFLAGS += -lpthread -ldevmapper -laio -ldl \
+LDFLAGS += -lpthread -ldevmapper -ldl \
-lmultipath -L$(multipathdir)
EXEC = multipath
diff --git a/multipathd/Makefile b/multipathd/Makefile
index b019959..565210f 100644
--- a/multipathd/Makefile
+++ b/multipathd/Makefile
@@ -6,7 +6,7 @@ include ../Makefile.inc
# basic flags setting
#
CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
-LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio -ldl \
+LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -ldl \
-lmultipath -L$(multipathdir)
#
--
1.5.4.5