FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-19-2012, 12:03 PM
Hannes Reinecke
 
Default Fix compilation on older udev versions

Older udev versions do not export 'udev_monitor_set_receive_buffer_size',
so we need to comment it out on those systems.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/Makefile | 7 +++++++
libmultipath/uevent.c | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/libmultipath/Makefile b/libmultipath/Makefile
index bacd89e..fd564cf 100644
--- a/libmultipath/Makefile
+++ b/libmultipath/Makefile
@@ -29,6 +29,13 @@ ifneq ($(strip $(LIBDM_API_COOKIE)),0)
CFLAGS += -DLIBDM_API_COOKIE
endif

+LIBUDEV_API_RECVBUF = $(shell grep -Ecs '^[a-z]*[[:space:]]+udev_monitor_set_resolve_buffer_size' /usr/include/libudev.h)
+
+ifneq ($(strip $(LIBUDEV_API_RECVBUF)),0)
+ CFLAGS += -DLIBUDEV_API_RECVBUF
+endif
+
+
all: $(LIBS)

$(LIBS): $(OBJS)
diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
index c1d45b0..11c650f 100644
--- a/libmultipath/uevent.c
+++ b/libmultipath/uevent.c
@@ -189,8 +189,10 @@ int uevent_listen(void)
condlog(2, "failed to create udev monitor");
goto out;
}
+#ifdef LIBUDEV_API_RECVBUF
if (udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024))
condlog(2, "failed to increase buffer size");
+#endif
fd = udev_monitor_get_fd(monitor);
if (fd < 0) {
condlog(2, "failed to get monitor fd");
--
1.7.3.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 04-30-2012, 10:26 AM
Hannes Reinecke
 
Default Fix compilation on older udev versions

Older udev versions do not export 'udev_monitor_set_receive_buffer_size',
so we need to comment it out on those systems.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/Makefile | 7 +++++++
libmultipath/uevent.c | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/libmultipath/Makefile b/libmultipath/Makefile
index bacd89e..fd564cf 100644
--- a/libmultipath/Makefile
+++ b/libmultipath/Makefile
@@ -29,6 +29,13 @@ ifneq ($(strip $(LIBDM_API_COOKIE)),0)
CFLAGS += -DLIBDM_API_COOKIE
endif

+LIBUDEV_API_RECVBUF = $(shell grep -Ecs '^[a-z]*[[:space:]]+udev_monitor_set_resolve_buffer_size' /usr/include/libudev.h)
+
+ifneq ($(strip $(LIBUDEV_API_RECVBUF)),0)
+ CFLAGS += -DLIBUDEV_API_RECVBUF
+endif
+
+
all: $(LIBS)

$(LIBS): $(OBJS)
diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
index c1d45b0..11c650f 100644
--- a/libmultipath/uevent.c
+++ b/libmultipath/uevent.c
@@ -189,8 +189,10 @@ int uevent_listen(void)
condlog(2, "failed to create udev monitor");
goto out;
}
+#ifdef LIBUDEV_API_RECVBUF
if (udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024))
condlog(2, "failed to increase buffer size");
+#endif
fd = udev_monitor_get_fd(monitor);
if (fd < 0) {
condlog(2, "failed to get monitor fd");
--
1.7.3.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org