[PATCH libevdev 2/2] Add a file to define missing bits for older kernels

Gaetan Nadon memsize at videotron.ca
Tue Oct 8 16:19:29 PDT 2013


On 13-10-08 06:25 PM, Peter Hutterer wrote:
> On Tue, Oct 08, 2013 at 10:03:11AM -0400, Gaetan Nadon wrote:
>> On 13-10-08 12:58 AM, Peter Hutterer wrote:
>>> This is a very simple patch for now, adding more bits gets complicated
>>> really quickly. So let's just add the most recent bits for now.
>>>
>>> CC: Gaetan Nadon <memsize at videotron.ca>
>>> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
>>> ---
>>> I've got a larger patchset that enables a lot more bits including RHEL6 support but
>>> I think for now we should just enable the most recent additions. It gets complicated
>>> really quickly otherwise and until we actually start shipping libevdev on RHEL6 we
>>> don't need to worry about more.
>>     /home/nadon/xorg/src/libevdev/.git/rebase-apply/patch:73: new blank
>>     line at EOF.
>>     +
>>     warning: 1 line adds whitespace errors.
>>
>>
>>       CCLD   libevdev-events
>>     ../libevdev/.libs/libevdev.so: undefined reference to `EVIOCGMTSLOTS'
>>     collect2: ld returned 1 exit status
>>     make[2]: *** [libevdev-events] Error 1
> yikes. I was hoping that wasn't the case because handling that one would
> require some more complicated bits. ok, let's ignore this patchset for now,
> I'll spin the one with the more involved bits once I figure out how to test
> for all permutations.
>
> for the archives: the difficult bit isn't to build on a kernel not
> supporting this, but to _run_ on such a kernel when built with support for
> the ioctl. 
>
> Gaetan, can you copy the #define below into your local libevdev-defines.h
> and tell me what else is missing on your kernel?
>
> #define EVIOCGMTSLOTS(len)      _IOC(_IOC_READ, 'E', 0x0a, len)

Success!!!

    nadon at memsize:~/xorg/src/libevdev/libevdev/.libs$ ldd  libevdev.so.1.0.0
        linux-vdso.so.1 =>  (0x00007fffb57ff000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe936385000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fe936973000)


Not sure if this is the right location:

    diff --git a/libevdev/libevdev-defines.h b/libevdev/libevdev-defines.h
    index 1289ad7..b8ad75b 100644
    --- a/libevdev/libevdev-defines.h
    +++ b/libevdev/libevdev-defines.h
    @@ -33,6 +33,7 @@
     
     #ifndef EVIOCSCLOCKID
     #define EVIOCSCLOCKID           _IOW('E', 0xa0, int)
    +#define EVIOCGMTSLOTS(len)      _IOC(_IOC_READ, 'E', 0x0a, len)
     #endif
     
     #ifndef ABS_MT_TOOL_Y


    Cheers,
       Peter

>>
>> Workstation:
>> Linux memsize 3.2.0-54-generic #82-Ubuntu SMP Tue Sep 10 20:08:42 UTC
>> 2013 x86_64 x86_64 x86_64 GNU/Linux
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/input-tools/attachments/20131008/d994d015/attachment.html>


More information about the Input-tools mailing list