Skip to contentSkip to conversation

Another compatibility issue

Drbd-dev Ante Karamatić 2 participants 2 messages Jun 19, 2009 DRBD driver

lore
Share & tools
lore
#0 lore raw

Hi again

Here's another issue I'm having. linux/drbd_config.h is right saying:

/* 2.6.29 and up no longer have swabb.h */

But, then doesn't do anything about it. So, proposed diff is attached.

drbd/linux/drbd_config.h 2009-06-19 17:19:00.000000000 +0200 renamed from drbd/linux/drbd_config.h 2009-06-19 16:11:44.000000000 +0200 +4 -0
@@ -74,7 +74,11 @@
 #define HAVE_LINUX_SCATTERLIST_H
 
 /* 2.6.29 and up no longer have swabb.h */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
 #define HAVE_LINUX_BYTEORDER_SWABB_H
+#endif
+
 
 /* Some vendor kernels < 2.6.7 might define msleep in one or
  * another way .. */
maintainer
#1 lore raw
Quoted 12 lines · Ante Karamatić

Hi again

Here's another issue I'm having. linux/drbd_config.h is right saying:

/* 2.6.29 and up no longer have swabb.h */

But, then doesn't do anything about it. So, proposed diff is attached.

drbd/linux/drbd_config.h 2009-06-19 17:19:00.000000000 +0200 renamed from drbd/linux/drbd_config.h 2009-06-19 16:11:44.000000000 +0200 +0 -0
@@ -74,7 +74,11 @@
 #define HAVE_LINUX_SCATTERLIST_H

drbd/linux/drbd_config.h 2009-06-19 17:19:00.000000000 +0200 line 84

Quoted 10 lines
drbd/linux/drbd_config.h 2009-06-19 17:19:00.000000000 +0200 renamed from drbd/linux/drbd_config.h 2009-06-19 16:11:44.000000000 +0200 +4 -0
 
 /* 2.6.29 and up no longer have swabb.h */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
 #define HAVE_LINUX_BYTEORDER_SWABB_H
+#endif
+
 
 /* Some vendor kernels < 2.6.7 might define msleep in one or
  * another way .. */

sorry, but NOnono again.

did you have a look at the output of the make run?

there is this uncool scripts/adjust_drbd_config_h.sh,
which will take care of, you guessed right, adjusting the drbd_config.h for whatever kernel source tree you try to compile it again.

and, no, it DOES NOT WORK to trigger on kernel version only. because of the vendor kernels, which include all sorts of backports. and they change such things even between very minor package release number changes.

Signature · 5 lines
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.