Bug#1067596: FTBFS: error: ‘const struct input_event’ has no member named ‘time’

2024-04-16 Thread Gianfranco Costamagna

Control: tags 1067596 + patch
Control: tags 1067596 + pending

Dear maintainer,

I've prepared an NMU for xf86-input-multitouch (versioned as 1.0~rc3-2.1) and
uploaded it.

diff -Nru xf86-input-multitouch-1.0~rc3/debian/changelog 
xf86-input-multitouch-1.0~rc3/debian/changelog
--- xf86-input-multitouch-1.0~rc3/debian/changelog  2018-03-12 
06:38:28.0 +0100
+++ xf86-input-multitouch-1.0~rc3/debian/changelog  2024-04-16 
23:27:03.0 +0200
@@ -1,3 +1,17 @@
+xf86-input-multitouch (1.0~rc3-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  [ Gianfranco Costamagna ]
+  * Drop libmtdev1 runtime dependency
+
+  [ Benjamin Drung ]
+  * debian/rules: Pass CPPFLAGS and CFLAGS to make call
+  * Port usage of struct input_event to input_event_*
+(Closes: #1067596, LP: #2061591)
+  * Include headers to fix implicit function declaration
+
+ -- Gianfranco Costamagna   Tue, 16 Apr 2024 
23:27:03 +0200
+
 xf86-input-multitouch (1.0~rc3-2) unstable; urgency=medium

   [ Helmut Grohne ]
diff -Nru xf86-input-multitouch-1.0~rc3/debian/control 
xf86-input-multitouch-1.0~rc3/debian/control
--- xf86-input-multitouch-1.0~rc3/debian/control2018-03-12 
06:38:28.0 +0100
+++ xf86-input-multitouch-1.0~rc3/debian/control2024-04-16 
23:27:03.0 +0200
@@ -15,8 +15,7 @@
 Architecture: linux-any
 Depends: ${shlibs:Depends},
  ${misc:Depends},
- ${xinpdriver:Depends},
- libmtdev1
+ ${xinpdriver:Depends}
 Provides: ${xinpdriver:Provides}
 Description: Multitouch X input driver
  This X input driver provides gestures support for multitouch touchpads,
diff -Nru 
xf86-input-multitouch-1.0~rc3/debian/patches/Include-headers-to-fix-implicit-function-declaration.patch
 
xf86-input-multitouch-1.0~rc3/debian/patches/Include-headers-to-fix-implicit-function-declaration.patch
--- 
xf86-input-multitouch-1.0~rc3/debian/patches/Include-headers-to-fix-implicit-function-declaration.patch
 1970-01-01 01:00:00.0 +0100
+++ 
xf86-input-multitouch-1.0~rc3/debian/patches/Include-headers-to-fix-implicit-function-declaration.patch
 2024-04-16 23:27:03.0 +0200
@@ -0,0 +1,46 @@
+From: Benjamin Drung 
+Date: Mon, 15 Apr 2024 20:11:11 +0200
+Subject: Include headers to fix implicit function declaration
+
+---
+ driver/multitouch.c | 1 +
+ src/mtouch.c| 1 +
+ src/test.c  | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/driver/multitouch.c b/driver/multitouch.c
+index a083adc..0c4615c 100644
+--- a/driver/multitouch.c
 b/driver/multitouch.c
+@@ -22,6 +22,7 @@
+ #include "gestures.h"
+
+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++#include 
+ #include 
+ #include 
+ #endif
+diff --git a/src/mtouch.c b/src/mtouch.c
+index a6b96b8..335c61e 100644
+--- a/src/mtouch.c
 b/src/mtouch.c
+@@ -20,6 +20,7 @@
+  **/
+
+ #include "mtouch.h"
++#include 
+
+ static const int use_grab = 0;
+
+diff --git a/src/test.c b/src/test.c
+index 1b67986..77b723e 100644
+--- a/src/test.c
 b/src/test.c
+@@ -22,6 +22,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+
+ static void loop_device(int fd)
+ {
diff -Nru 
xf86-input-multitouch-1.0~rc3/debian/patches/Port-usage-of-struct-input_event-to-input_event_.patch
 
xf86-input-multitouch-1.0~rc3/debian/patches/Port-usage-of-struct-input_event-to-input_event_.patch
--- 
xf86-input-multitouch-1.0~rc3/debian/patches/Port-usage-of-struct-input_event-to-input_event_.patch
 1970-01-01 01:00:00.0 +0100
+++ 
xf86-input-multitouch-1.0~rc3/debian/patches/Port-usage-of-struct-input_event-to-input_event_.patch
 2024-04-16 23:27:03.0 +0200
@@ -0,0 +1,40 @@
+From: Benjamin Drung 
+Date: Mon, 15 Apr 2024 19:56:58 +0200
+Subject: Port usage of struct input_event to input_event_*
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+It fails to build on armhf:
+
+```
+src/hwstate.c: In function ‘finish_packet’:
+src/hwstate.c:43:24: error: ‘const struct input_event’ has no member named
+‘time’
+   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
+  | ^~
+src/hwstate.c:43:49: error: ‘const struct input_event’ has no member named
+‘time’
+   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
+  | ^~
+```
+
+Closes: #1067596
+LP: #2061591
+---
+ src/hwstate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/hwstate.c b/src/hwstate.c
+index 076efa1..ab2ac48 100644
+--- a/src/hwstate.c
 b/src/hwstate.c
+@@ -40,7 +40,7 @@ static void finish_packet(struct HWState *s, const struct 
Capabilities *caps,
+   if (!caps->has_abs[MTDEV_WIDTH_MINOR])
+   s->data[i].width_minor = s->data[i].width_major;
+   }
+-  s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
++  s->evtime = syn->input_event_usec / ms + syn->input_event_sec * ms;
+ }
+
+ static int read_event(struct H

Bug#1067596: FTBFS: error: ‘const struct input_event’ has no member named ‘time’

2024-03-24 Thread Andrey Rakhmatullin
Source: xf86-input-multitouch
Version: 1.0~rc3-2
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/fetch.php?pkg=xf86-input-
multitouch&arch=armel&ver=1.0%7Erc3-2%2Bb2&stamp=1711272573&raw=0

src/hwstate.c: In function ‘finish_packet’:
src/hwstate.c:43:24: error: ‘const struct input_event’ has no member named
‘time’
   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
  |^~
src/hwstate.c:43:49: error: ‘const struct input_event’ has no member named
‘time’
   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
  | ^~



It also has multiple "warning: implicit declaration of function" which are not
errors because the package ignores compiler flags from dh_auto_build (which is
also a bug, not sure if RC or not).


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.7.9-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled