Building using older kernel headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am trying to build udev 172 using a toolchain which uses a 2.6.32
(or older). The previous version I tested (v114) compiled fine, and
the newer version (V172) does not compile since it needs
BTN_TRIGGER_HAPPY available at linux/input.h

My options are:

1) Use a new toolchain
2) Use an older version (which one..?)
3) Patch udev for cases in which the symbol in sot found
3.a) define the symbol locally
3.b) #ifdef that offending code out

I currently chose to to 3.a, which seems to work for now, even though
I am running under kernel 2.6.32 (which does not support the joystick
event which triggered this issue). I think 3.b can be a good idea, and
I know that even using a newer toolchain works for me, but I would
like to keep the toolchain.

Which is the newest udev version you can recommend me?
Will you accept such patch, for 3.a, or 3.b?

- diego
Only in udev-172/extras/input_id/: .deps
Only in udev-172/extras/input_id/: .dirstamp
Only in udev-172/extras/input_id/: input_id
diff -u udev-172.orig/extras/input_id/input_id.c udev-172/extras/input_id/input_id.c
--- udev-172.orig/extras/input_id/input_id.c	2011-06-06 19:31:56.000000000 +0300
+++ udev-172/extras/input_id/input_id.c	2011-07-27 13:21:41.162057204 +0300
@@ -38,6 +38,53 @@
 #define LONG(x) ((x)/BITS_PER_LONG)
 #define test_bit(bit, array)    ((array[LONG(bit)] >> OFF(bit)) & 1)
 
+// ugly work around for older toolchains which contain 
+// kernel headers bellow 2.6.32,
+// defines happly stollen from  /usr/include/linux/input.h
+#ifndef BTN_TRIGGER_HAPPY
+#define BTN_TRIGGER_HAPPY		0x2c0
+#define BTN_TRIGGER_HAPPY1		0x2c0
+#define BTN_TRIGGER_HAPPY2		0x2c1
+#define BTN_TRIGGER_HAPPY3		0x2c2
+#define BTN_TRIGGER_HAPPY4		0x2c3
+#define BTN_TRIGGER_HAPPY5		0x2c4
+#define BTN_TRIGGER_HAPPY6		0x2c5
+#define BTN_TRIGGER_HAPPY7		0x2c6
+#define BTN_TRIGGER_HAPPY8		0x2c7
+#define BTN_TRIGGER_HAPPY9		0x2c8
+#define BTN_TRIGGER_HAPPY10		0x2c9
+#define BTN_TRIGGER_HAPPY11		0x2ca
+#define BTN_TRIGGER_HAPPY12		0x2cb
+#define BTN_TRIGGER_HAPPY13		0x2cc
+#define BTN_TRIGGER_HAPPY14		0x2cd
+#define BTN_TRIGGER_HAPPY15		0x2ce
+#define BTN_TRIGGER_HAPPY16		0x2cf
+#define BTN_TRIGGER_HAPPY17		0x2d0
+#define BTN_TRIGGER_HAPPY18		0x2d1
+#define BTN_TRIGGER_HAPPY19		0x2d2
+#define BTN_TRIGGER_HAPPY20		0x2d3
+#define BTN_TRIGGER_HAPPY21		0x2d4
+#define BTN_TRIGGER_HAPPY22		0x2d5
+#define BTN_TRIGGER_HAPPY23		0x2d6
+#define BTN_TRIGGER_HAPPY24		0x2d7
+#define BTN_TRIGGER_HAPPY25		0x2d8
+#define BTN_TRIGGER_HAPPY26		0x2d9
+#define BTN_TRIGGER_HAPPY27		0x2da
+#define BTN_TRIGGER_HAPPY28		0x2db
+#define BTN_TRIGGER_HAPPY29		0x2dc
+#define BTN_TRIGGER_HAPPY30		0x2dd
+#define BTN_TRIGGER_HAPPY31		0x2de
+#define BTN_TRIGGER_HAPPY32		0x2df
+#define BTN_TRIGGER_HAPPY33		0x2e0
+#define BTN_TRIGGER_HAPPY34		0x2e1
+#define BTN_TRIGGER_HAPPY35		0x2e2
+#define BTN_TRIGGER_HAPPY36		0x2e3
+#define BTN_TRIGGER_HAPPY37		0x2e4
+#define BTN_TRIGGER_HAPPY38		0x2e5
+#define BTN_TRIGGER_HAPPY39		0x2e6
+#define BTN_TRIGGER_HAPPY40		0x2e7
+#endif
+
 static int debug = 0;
 
 static void log_fn(struct udev *udev, int priority,
Only in udev-172/extras/input_id/: input_id.o
Only in udev-172/extras/input_id/: .libs

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux