All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] package/canfestival: fix musl compilation
@ 2015-08-17 21:51 Brendan Heading
  2015-08-18  5:37 ` Jörg Krause
  2015-08-18  5:53 ` Baruch Siach
  0 siblings, 2 replies; 4+ messages in thread
From: Brendan Heading @ 2015-08-17 21:51 UTC (permalink / raw)
  To: buildroot

Fixes: http://autobuild.buildroot.net/results/75a/75aa6e7e4f3dcd74e4b65496060328ec7bd0e747/

ANSI signal handlers take an int parameter, not sigval_t.

Upstream-status: pending

---
v1 -> v2 - added missing link to autobuild failure in commit comment
---

Signed-off-by: Brendan Heading <brendanheading@gmail.com>
---
 .../canfestival/0003-fix-musl-compilation.patch    | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 package/canfestival/0003-fix-musl-compilation.patch

diff --git a/package/canfestival/0003-fix-musl-compilation.patch b/package/canfestival/0003-fix-musl-compilation.patch
new file mode 100644
index 0000000..dfe16a7
--- /dev/null
+++ b/package/canfestival/0003-fix-musl-compilation.patch
@@ -0,0 +1,22 @@
+# HG changeset patch
+# User Brendan Heading <brendanheading@gmail.com>
+# Date 1439845818 -3600
+#      Mon Aug 17 22:10:18 2015 +0100
+# Node ID 7d62beec4f813074ba250231762f4b84395cc354
+# Parent  8bfe0ac00cdb4d473664fcbf1228a0f6a42eee15
+Fix MUSL compilation issue
+
+signal handler parameter fixed to be int instead of sigval_t.
+
+diff -r 8bfe0ac00cdb -r 7d62beec4f81 drivers/timers_unix/timers_unix.c
+--- a/drivers/timers_unix/timers_unix.c	Mon Aug 03 18:01:58 2015 +0200
++++ b/drivers/timers_unix/timers_unix.c	Mon Aug 17 22:10:18 2015 +0100
+@@ -33,7 +33,7 @@
+ 	}
+ }
+ 
+-void timer_notify(sigval_t val)
++void timer_notify(int val)
+ {
+ 	if(gettimeofday(&last_sig,NULL)) {
+ 		perror("gettimeofday()");
-- 
2.4.3

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

* [Buildroot] [PATCH v2 1/1] package/canfestival: fix musl compilation
  2015-08-17 21:51 [Buildroot] [PATCH v2 1/1] package/canfestival: fix musl compilation Brendan Heading
@ 2015-08-18  5:37 ` Jörg Krause
  2015-08-18 14:28   ` Brendan Heading
  2015-08-18  5:53 ` Baruch Siach
  1 sibling, 1 reply; 4+ messages in thread
From: Jörg Krause @ 2015-08-18  5:37 UTC (permalink / raw)
  To: buildroot

On Mo, 2015-08-17 at 22:51 +0100, Brendan Heading wrote:
> Fixes: http://autobuild.buildroot.net/results/75a/75aa6e7e4f3dcd74e4b
> 65496060328ec7bd0e747/
> 
> ANSI signal handlers take an int parameter, not sigval_t.

This is true for uClibc, but for other libc timer_notify is asigned to
the `sigev_notify_function` function which has an `union sigval` as
argument [1].

Snipped from the source code of timers_unix.c:

#if defined(__UCLIBC__)
	[..]
	signal(SIGALRM, timer_notify);
#else
	[..]
	sigev.sigev_notify_function = timer_notify;
	[..]
#endif
}

[1] http://man7.org/linux/man-pages/man7/sigevent.7.html

Best regards
J?rg Krause
> 

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

* [Buildroot] [PATCH v2 1/1] package/canfestival: fix musl compilation
  2015-08-17 21:51 [Buildroot] [PATCH v2 1/1] package/canfestival: fix musl compilation Brendan Heading
  2015-08-18  5:37 ` Jörg Krause
@ 2015-08-18  5:53 ` Baruch Siach
  1 sibling, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2015-08-18  5:53 UTC (permalink / raw)
  To: buildroot

Hi Brendan,

On Mon, Aug 17, 2015 at 10:51:33PM +0100, Brendan Heading wrote:
> Fixes: http://autobuild.buildroot.net/results/75a/75aa6e7e4f3dcd74e4b65496060328ec7bd0e747/
> 
> ANSI signal handlers take an int parameter, not sigval_t.
> 
> Upstream-status: pending
> 
> ---

This cuts off your sign-off below. Patch version info should go ...

> v1 -> v2 - added missing link to autobuild failure in commit comment
> ---
> 
> Signed-off-by: Brendan Heading <brendanheading@gmail.com>
> ---

... here.

>  .../canfestival/0003-fix-musl-compilation.patch    | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644 package/canfestival/0003-fix-musl-compilation.patch
> 
> diff --git a/package/canfestival/0003-fix-musl-compilation.patch b/package/canfestival/0003-fix-musl-compilation.patch
> new file mode 100644
> index 0000000..dfe16a7
> --- /dev/null
> +++ b/package/canfestival/0003-fix-musl-compilation.patch
> @@ -0,0 +1,22 @@
> +# HG changeset patch
> +# User Brendan Heading <brendanheading@gmail.com>
> +# Date 1439845818 -3600
> +#      Mon Aug 17 22:10:18 2015 +0100
> +# Node ID 7d62beec4f813074ba250231762f4b84395cc354
> +# Parent  8bfe0ac00cdb4d473664fcbf1228a0f6a42eee15
> +Fix MUSL compilation issue
> +
> +signal handler parameter fixed to be int instead of sigval_t.

Missing sign-off.

> +
> +diff -r 8bfe0ac00cdb -r 7d62beec4f81 drivers/timers_unix/timers_unix.c
> +--- a/drivers/timers_unix/timers_unix.c	Mon Aug 03 18:01:58 2015 +0200
> ++++ b/drivers/timers_unix/timers_unix.c	Mon Aug 17 22:10:18 2015 +0100
> +@@ -33,7 +33,7 @@
> + 	}
> + }
> + 
> +-void timer_notify(sigval_t val)
> ++void timer_notify(int val)
> + {
> + 	if(gettimeofday(&last_sig,NULL)) {
> + 		perror("gettimeofday()");

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH v2 1/1] package/canfestival: fix musl compilation
  2015-08-18  5:37 ` Jörg Krause
@ 2015-08-18 14:28   ` Brendan Heading
  0 siblings, 0 replies; 4+ messages in thread
From: Brendan Heading @ 2015-08-18 14:28 UTC (permalink / raw)
  To: buildroot

On 18 August 2015 at 06:37, J?rg Krause <joerg.krause@embedded.rocks> wrote:
> On Mo, 2015-08-17 at 22:51 +0100, Brendan Heading wrote:
>> Fixes: http://autobuild.buildroot.net/results/75a/75aa6e7e4f3dcd74e4b
>> 65496060328ec7bd0e747/
>>
>> ANSI signal handlers take an int parameter, not sigval_t.
>
> This is true for uClibc, but for other libc timer_notify is asigned to
> the `sigev_notify_function` function which has an `union sigval` as
> argument [1].

Jorg,

Well spotted. I failed to check the non-uclibc case.

The code is a bit strange; I'm not sure why they've decided to do it
differently in uclibc. I would have thought timer_create would behave
in the same way.

Do you think it would suffice to add another #ifdef __UCLIBC__ on the
signal handler, or should I dive a bit deeper ?

Brendan

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

end of thread, other threads:[~2015-08-18 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17 21:51 [Buildroot] [PATCH v2 1/1] package/canfestival: fix musl compilation Brendan Heading
2015-08-18  5:37 ` Jörg Krause
2015-08-18 14:28   ` Brendan Heading
2015-08-18  5:53 ` Baruch Siach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.