From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Bender Date: Fri, 27 May 2011 10:09:12 +0000 Subject: Re: [ANNOUNCE] udev 171 Message-Id: <4DDF7848.4020005@san.rr.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On 5/26/2011 11:47 PM, Gabor Z. Papp wrote: > * Kay Sievers: > > | udev 171 > | ==== > | Bugfixes. > > [...] > > | udev 169 > | ==== > | Bugfixes. > > | We require at least Linux kernel 2.6.32 now. > > CC extras/input_id/input_id.o > extras/input_id/input_id.c: In function 'test_key': > extras/input_id/input_id.c:167: error: 'BTN_TRIGGER_HAPPY' undeclared (first use in this function) > extras/input_id/input_id.c:167: error: (Each undeclared identifier is reported only once > extras/input_id/input_id.c:167: error: for each function it appears in.) > make[2]: *** [extras/input_id/input_id.o] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > $ uname -a > Linux gzp 2.6.32.41 #1 SMP PREEMPT Tue May 24 09:17:23 CEST 2011 i686 GNU/Linux I believe that BTN_TRIGGER_HAPPY was added to linux/input.h in the 2.6.34 kernel. Given that the udev function in question is attempting to differentiate between KEY_* and BTN_* events and given that KEY_* and BTN_* events are intermixed numerically, I cannot think of a reliable solution (even the current implementation is not reliable). When I wrote eventlircd, my solution to this problem (I wanted to separate keyboard events from mice and joystick events) was to write an awk script that created a look up array for KEY_* versus BTN_* by parsing linux/input.h. I used the autoconf archives macro AX_ABSOLUTE_HEADER to locate linux/input.h at build time in the configure phase. While not ideal, it was the best hack I could come up with.