diff mbox

eudev: build with older kernels.

Message ID 20161229144649.29850-1-barbieri@profusion.mobi
State Superseded
Headers show

Commit Message

Gustavo Sverzut Barbieri Dec. 29, 2016, 2:46 p.m. UTC
Add missing defines so eudev builds for older kernels such as 2.6

Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
---
 package/eudev/0002-missing-defines-for-old-kernels.patch | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 package/eudev/0002-missing-defines-for-old-kernels.patch

Comments

Romain Naour Dec. 29, 2016, 3:51 p.m. UTC | #1
Hi Gustavo,

Le 29/12/2016 à 15:46, Gustavo Sverzut Barbieri a écrit :
> Add missing defines so eudev builds for older kernels such as 2.6

Can you summit this patch to eudev upstream ?

> 
> Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
> ---
>  package/eudev/0002-missing-defines-for-old-kernels.patch | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>  create mode 100644 package/eudev/0002-missing-defines-for-old-kernels.patch
> 
> diff --git a/package/eudev/0002-missing-defines-for-old-kernels.patch b/package/eudev/0002-missing-defines-for-old-kernels.patch
> new file mode 100644
> index 000000000..d34020f04
> --- /dev/null
> +++ b/package/eudev/0002-missing-defines-for-old-kernels.patch
> @@ -0,0 +1,16 @@
> +--- a/src/udev/udev-builtin-input_id.c	2016-12-23 16:43:55.398985478 +0000
> ++++ b/src/udev/udev-builtin-input_id.c	2016-12-23 16:48:40.907182701 +0000

missing patch description and SoB line.
I guess it should be the same as above.

> +@@ -33,6 +33,13 @@
> + #include "udev.h"
> + #include "util.h"
> + 
> ++#ifndef BTN_TRIGGER_HAPPY
> ++#define BTN_TRIGGER_HAPPY 0x2c0
> ++#endif
> ++#ifndef INPUT_PROP_MAX
> ++#define INPUT_PROP_MAX 0x1f
> ++#endif

Otherwise these values seems correct.
Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ++
> + /* we must use this kernel-compatible implementation */
> + #define BITS_PER_LONG (sizeof(unsigned long) * 8)
> + #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
>
Gustavo Sverzut Barbieri Dec. 29, 2016, 4:01 p.m. UTC | #2
On Thu, Dec 29, 2016 at 1:51 PM, Romain Naour <romain.naour@gmail.com> wrote:
> Hi Gustavo,
>
> Le 29/12/2016 à 15:46, Gustavo Sverzut Barbieri a écrit :
>> Add missing defines so eudev builds for older kernels such as 2.6
>
> Can you summit this patch to eudev upstream ?

I will try, but not sure they bother with ancient 2.6 kernels like the
one I need :-D


>> Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
>> ---
>>  package/eudev/0002-missing-defines-for-old-kernels.patch | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
>>  create mode 100644 package/eudev/0002-missing-defines-for-old-kernels.patch
>>
>> diff --git a/package/eudev/0002-missing-defines-for-old-kernels.patch b/package/eudev/0002-missing-defines-for-old-kernels.patch
>> new file mode 100644
>> index 000000000..d34020f04
>> --- /dev/null
>> +++ b/package/eudev/0002-missing-defines-for-old-kernels.patch
>> @@ -0,0 +1,16 @@
>> +--- a/src/udev/udev-builtin-input_id.c       2016-12-23 16:43:55.398985478 +0000
>> ++++ b/src/udev/udev-builtin-input_id.c       2016-12-23 16:48:40.907182701 +0000
>
> missing patch description and SoB line.
> I guess it should be the same as above.

will submit a new one with these


>> +@@ -33,6 +33,13 @@
>> + #include "udev.h"
>> + #include "util.h"
>> +
>> ++#ifndef BTN_TRIGGER_HAPPY
>> ++#define BTN_TRIGGER_HAPPY 0x2c0
>> ++#endif
>> ++#ifndef INPUT_PROP_MAX
>> ++#define INPUT_PROP_MAX 0x1f
>> ++#endif
>
> Otherwise these values seems correct.
> Reviewed-by: Romain Naour <romain.naour@gmail.com>
>
> Best regards,
> Romain
>
>> ++
>> + /* we must use this kernel-compatible implementation */
>> + #define BITS_PER_LONG (sizeof(unsigned long) * 8)
>> + #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
>>
>
Romain Naour Dec. 29, 2016, 4:04 p.m. UTC | #3
Le 29/12/2016 à 17:01, Gustavo Sverzut Barbieri a écrit :
> On Thu, Dec 29, 2016 at 1:51 PM, Romain Naour <romain.naour@gmail.com> wrote:
>> Hi Gustavo,
>>
>> Le 29/12/2016 à 15:46, Gustavo Sverzut Barbieri a écrit :
>>> Add missing defines so eudev builds for older kernels such as 2.6
>>
>> Can you summit this patch to eudev upstream ?
> 
> I will try, but not sure they bother with ancient 2.6 kernels like the
> one I need :-D

Well, if it's just two defines...

> 
> 
>>> Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
>>> ---
>>>  package/eudev/0002-missing-defines-for-old-kernels.patch | 16 ++++++++++++++++
>>>  1 file changed, 16 insertions(+)
>>>  create mode 100644 package/eudev/0002-missing-defines-for-old-kernels.patch
>>>
>>> diff --git a/package/eudev/0002-missing-defines-for-old-kernels.patch b/package/eudev/0002-missing-defines-for-old-kernels.patch
>>> new file mode 100644
>>> index 000000000..d34020f04
>>> --- /dev/null
>>> +++ b/package/eudev/0002-missing-defines-for-old-kernels.patch
>>> @@ -0,0 +1,16 @@
>>> +--- a/src/udev/udev-builtin-input_id.c       2016-12-23 16:43:55.398985478 +0000
>>> ++++ b/src/udev/udev-builtin-input_id.c       2016-12-23 16:48:40.907182701 +0000
>>
>> missing patch description and SoB line.
>> I guess it should be the same as above.
> 
> will submit a new one with these

ok

> 
> 
>>> +@@ -33,6 +33,13 @@
>>> + #include "udev.h"
>>> + #include "util.h"
>>> +
>>> ++#ifndef BTN_TRIGGER_HAPPY
>>> ++#define BTN_TRIGGER_HAPPY 0x2c0
>>> ++#endif
>>> ++#ifndef INPUT_PROP_MAX
>>> ++#define INPUT_PROP_MAX 0x1f
>>> ++#endif
>>
>> Otherwise these values seems correct.
>> Reviewed-by: Romain Naour <romain.naour@gmail.com>

Don't forget my tag in v2 ;)

Romain

>>
>> Best regards,
>> Romain
>>
>>> ++
>>> + /* we must use this kernel-compatible implementation */
>>> + #define BITS_PER_LONG (sizeof(unsigned long) * 8)
>>> + #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
>>>
>>
> 
> 
>
Gustavo Sverzut Barbieri Dec. 30, 2016, 1:34 p.m. UTC | #4
On Thu, Dec 29, 2016 at 2:04 PM, Romain Naour <romain.naour@gmail.com> wrote:
> Le 29/12/2016 à 17:01, Gustavo Sverzut Barbieri a écrit :
>> On Thu, Dec 29, 2016 at 1:51 PM, Romain Naour <romain.naour@gmail.com> wrote:
>>> Hi Gustavo,
>>>
>>> Le 29/12/2016 à 15:46, Gustavo Sverzut Barbieri a écrit :
>>>> Add missing defines so eudev builds for older kernels such as 2.6
>>>
>>> Can you summit this patch to eudev upstream ?
>>
>> I will try, but not sure they bother with ancient 2.6 kernels like the
>> one I need :-D
>
> Well, if it's just two defines...

done https://github.com/gentoo/eudev/pull/139

if you want to track
Gustavo Sverzut Barbieri Dec. 30, 2016, 2:56 p.m. UTC | #5
they suggested to add to src/shared/missing.h, that I did and indeed
looks better.

I'll send a new patch with that as well.

On Fri, Dec 30, 2016 at 11:34 AM, Gustavo Sverzut Barbieri
<barbieri@profusion.mobi> wrote:
> On Thu, Dec 29, 2016 at 2:04 PM, Romain Naour <romain.naour@gmail.com> wrote:
>> Le 29/12/2016 à 17:01, Gustavo Sverzut Barbieri a écrit :
>>> On Thu, Dec 29, 2016 at 1:51 PM, Romain Naour <romain.naour@gmail.com> wrote:
>>>> Hi Gustavo,
>>>>
>>>> Le 29/12/2016 à 15:46, Gustavo Sverzut Barbieri a écrit :
>>>>> Add missing defines so eudev builds for older kernels such as 2.6
>>>>
>>>> Can you summit this patch to eudev upstream ?
>>>
>>> I will try, but not sure they bother with ancient 2.6 kernels like the
>>> one I need :-D
>>
>> Well, if it's just two defines...
>
> done https://github.com/gentoo/eudev/pull/139
>
> if you want to track
>
> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --------------------------------------
> MSN, GTalk, FaceTime: barbieri@gmail.com
> Skype: gsbarbieri
> Mobile: +55 (16) 99354-9890
diff mbox

Patch

diff --git a/package/eudev/0002-missing-defines-for-old-kernels.patch b/package/eudev/0002-missing-defines-for-old-kernels.patch
new file mode 100644
index 000000000..d34020f04
--- /dev/null
+++ b/package/eudev/0002-missing-defines-for-old-kernels.patch
@@ -0,0 +1,16 @@ 
+--- a/src/udev/udev-builtin-input_id.c	2016-12-23 16:43:55.398985478 +0000
++++ b/src/udev/udev-builtin-input_id.c	2016-12-23 16:48:40.907182701 +0000
+@@ -33,6 +33,13 @@
+ #include "udev.h"
+ #include "util.h"
+ 
++#ifndef BTN_TRIGGER_HAPPY
++#define BTN_TRIGGER_HAPPY 0x2c0
++#endif
++#ifndef INPUT_PROP_MAX
++#define INPUT_PROP_MAX 0x1f
++#endif
++
+ /* we must use this kernel-compatible implementation */
+ #define BITS_PER_LONG (sizeof(unsigned long) * 8)
+ #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)