Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends
@ 2017-08-25  7:26 Kurt Van Dijck
  2017-08-25 14:00 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Kurt Van Dijck @ 2017-08-25  7:26 UTC (permalink / raw)
  To: buildroot

The eibd usb backend implements clock_gettime, and calls pth_int_time from there.
pth_int_time will result in a call to clock_gettime, resulting in an endless
recursion.
The problem is that the USB backend shouldn't overrule clock_gettime in the first place.
Since the function does semantically and syntactically the same, the function is
place in comment alltogether.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
---
 package/bcusdk/0002-linux-usbfs-clock-gettime.patch | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 package/bcusdk/0002-linux-usbfs-clock-gettime.patch

diff --git a/package/bcusdk/0002-linux-usbfs-clock-gettime.patch b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
new file mode 100644
index 0000000..6d024c6
--- /dev/null
+++ b/package/bcusdk/0002-linux-usbfs-clock-gettime.patch
@@ -0,0 +1,16 @@
+--- a/eibd/usb/linux_usbfs.c	2017-07-29 22:24:15.890087674 +0200
++++ b/eibd/usb/linux_usbfs.c	2017-07-29 22:20:11.830085100 +0200
+@@ -52,11 +52,13 @@
+ 	return 0;
+ }
+ 
++/* don't redefine clock_gettime, use the system version
+ int clock_gettime(clockid_t clk_id, struct timespec *tp)
+ {
+ 	pth_int_time (tp);
+ 	return 0;
+ }
++*/
+ 
+ /* sysfs vs usbfs:
+  * opening a usbfs node causes the device to be resumed, so we attempt to
-- 
1.8.5.rc3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-25 21:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25  7:26 [Buildroot] [PATCH] bcusdk: fix endless recursion when opening USB backends Kurt Van Dijck
2017-08-25 14:00 ` Thomas Petazzoni
2017-08-25 19:36   ` Kurt Van Dijck
2017-08-25 20:16     ` Thomas Petazzoni
2017-08-25 20:47       ` Kurt Van Dijck
2017-08-25 20:58         ` Thomas Petazzoni
2017-08-25 21:33           ` Kurt Van Dijck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox