* [Buildroot] [PATCH] empty: fix compile with toolchain w/o threads
@ 2015-07-09 9:31 Waldemar Brodkorb
2015-08-08 10:46 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Waldemar Brodkorb @ 2015-07-09 9:31 UTC (permalink / raw
To: buildroot
As found via autobuilders and discussed on the list, the
ifdef is wrong, as empty uses SysV semaphores and not POSIX
semaphores.
Tested with glibc/uclibc-ng builds. And with uclibc-ng without
threads.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
package/empty/0002-fix-non-thread-build.patch | 49 +++++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 package/empty/0002-fix-non-thread-build.patch
diff --git a/package/empty/0002-fix-non-thread-build.patch b/package/empty/0002-fix-non-thread-build.patch
new file mode 100644
index 0000000..4854d86
--- /dev/null
+++ b/package/empty/0002-fix-non-thread-build.patch
@@ -0,0 +1,49 @@
+empty uses SysV semaphores, so the ifdef is wrong here.
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+--- empty-0.6.19b.orig/empty.c 2012-09-19 13:24:05.000000000 +0200
++++ empty-0.6.19b/empty.c 2015-07-09 02:00:09.000000000 +0200
+@@ -179,25 +179,23 @@ int main (int argc, char *argv[]) {
+ 2 - unknown */
+
+ /* semaphores */
+-#ifdef _POSIX_SEMAPHORES
+- #if defined(__linux__) && defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
+- /* union semun is defined by including <sys/sem.h> */
+- #else
+- union semun {
+- int val;
+- struct semid_ds *buf;
+- #ifdef __SVR4
+- ushort_t *array;
+- #endif
+- #ifdef __hpux__
+- ushort *array;
+- #endif
+- #ifdef __linux__
+- unsigned short *array;
+- struct seminfo *__buf; /* buffer for IPC_INFO */
+- #endif
+- };
+- #endif
++#if defined(__linux__) && defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
++ /* union semun is defined by including <sys/sem.h> */
++#else
++ union semun {
++ int val;
++ struct semid_ds *buf;
++ #ifdef __SVR4
++ ushort_t *array;
++ #endif
++ #ifdef __hpux__
++ ushort *array;
++ #endif
++ #ifdef __linux__
++ unsigned short *array;
++ struct seminfo *__buf; /* buffer for IPC_INFO */
++ #endif
++ };
+ #endif
+ union semun semu;
+
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] empty: fix compile with toolchain w/o threads
2015-07-09 9:31 [Buildroot] [PATCH] empty: fix compile with toolchain w/o threads Waldemar Brodkorb
@ 2015-08-08 10:46 ` Thomas Petazzoni
2015-08-10 18:01 ` Waldemar Brodkorb
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-08-08 10:46 UTC (permalink / raw
To: buildroot
Dear Waldemar Brodkorb,
On Thu, 9 Jul 2015 11:31:40 +0200, Waldemar Brodkorb wrote:
> As found via autobuilders and discussed on the list, the
> ifdef is wrong, as empty uses SysV semaphores and not POSIX
> semaphores.
>
> Tested with glibc/uclibc-ng builds. And with uclibc-ng without
> threads.
>
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
> package/empty/0002-fix-non-thread-build.patch | 49 +++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 package/empty/0002-fix-non-thread-build.patch
Applied, thanks. Could you submit the patch upstream?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] empty: fix compile with toolchain w/o threads
2015-08-08 10:46 ` Thomas Petazzoni
@ 2015-08-10 18:01 ` Waldemar Brodkorb
2015-08-10 18:57 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Waldemar Brodkorb @ 2015-08-10 18:01 UTC (permalink / raw
To: buildroot
Hi,
Thomas Petazzoni wrote,
> Dear Waldemar Brodkorb,
>
> On Thu, 9 Jul 2015 11:31:40 +0200, Waldemar Brodkorb wrote:
> > As found via autobuilders and discussed on the list, the
> > ifdef is wrong, as empty uses SysV semaphores and not POSIX
> > semaphores.
> >
> > Tested with glibc/uclibc-ng builds. And with uclibc-ng without
> > threads.
> >
> > Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> > ---
> > package/empty/0002-fix-non-thread-build.patch | 49 +++++++++++++++++++++++++
> > 1 file changed, 49 insertions(+)
> > create mode 100644 package/empty/0002-fix-non-thread-build.patch
>
> Applied, thanks. Could you submit the patch upstream?
I sent it to Mikhail Zakharov and he mailed me back that he has
applied it.
best regards
Waldemar
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] empty: fix compile with toolchain w/o threads
2015-08-10 18:01 ` Waldemar Brodkorb
@ 2015-08-10 18:57 ` Thomas Petazzoni
2015-08-10 19:03 ` Waldemar Brodkorb
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-08-10 18:57 UTC (permalink / raw
To: buildroot
Waldemar,
On Mon, 10 Aug 2015 20:01:53 +0200, Waldemar Brodkorb wrote:
> I sent it to Mikhail Zakharov and he mailed me back that he has
> applied it.
Excellent, thanks! I see he has done a new release 0.6.20b a few hours
ago. Can you check whether it includes the fix?
The previous release was from 2012, so I wasn't really expecting to see
a new release anytime soon.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] empty: fix compile with toolchain w/o threads
2015-08-10 18:57 ` Thomas Petazzoni
@ 2015-08-10 19:03 ` Waldemar Brodkorb
0 siblings, 0 replies; 5+ messages in thread
From: Waldemar Brodkorb @ 2015-08-10 19:03 UTC (permalink / raw
To: buildroot
Hi Thomas,
Thomas Petazzoni wrote,
> Waldemar,
>
> On Mon, 10 Aug 2015 20:01:53 +0200, Waldemar Brodkorb wrote:
>
> > I sent it to Mikhail Zakharov and he mailed me back that he has
> > applied it.
>
> Excellent, thanks! I see he has done a new release 0.6.20b a few hours
> ago. Can you check whether it includes the fix?
>
> The previous release was from 2012, so I wasn't really expecting to see
> a new release anytime soon.
Yes, indeed, patch is included.
best regards
Waldemar
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-10 19:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 9:31 [Buildroot] [PATCH] empty: fix compile with toolchain w/o threads Waldemar Brodkorb
2015-08-08 10:46 ` Thomas Petazzoni
2015-08-10 18:01 ` Waldemar Brodkorb
2015-08-10 18:57 ` Thomas Petazzoni
2015-08-10 19:03 ` Waldemar Brodkorb
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.