All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] unit: fix build with musl libc
@ 2019-10-03 15:03 Natanael Copa
  2019-10-03 15:58 ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Natanael Copa @ 2019-10-03 15:03 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

Define WAIT_ANY if needed. It is not specified in POSIX so we cannot
expect it to be defined.

This fixes build with musl libc.
---
 unit/test-dbus-message-fds.c | 4 ++++
 unit/test-dbus-properties.c  | 4 ++++
 unit/test-dbus.c             | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/unit/test-dbus-message-fds.c b/unit/test-dbus-message-fds.c
index 6f68bae..6a23141 100644
--- a/unit/test-dbus-message-fds.c
+++ b/unit/test-dbus-message-fds.c
@@ -41,6 +41,10 @@
 #define WAIT_ANY (-1) /* Any process */
 #endif
 
+#ifndef WAIT_ANY
+#define WAIT_ANY (-1)
+#endif
+
 #define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
 
 static pid_t dbus_daemon_pid = -1;
diff --git a/unit/test-dbus-properties.c b/unit/test-dbus-properties.c
index 1844ec0..7847c10 100644
--- a/unit/test-dbus-properties.c
+++ b/unit/test-dbus-properties.c
@@ -38,6 +38,10 @@
 #define WAIT_ANY (-1) /* Any process */
 #endif
 
+#ifndef WAIT_ANY
+#define WAIT_ANY (-1)
+#endif
+
 #define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
 
 static pid_t dbus_daemon_pid = -1;
diff --git a/unit/test-dbus.c b/unit/test-dbus.c
index 67f0a7b..05de3f9 100644
--- a/unit/test-dbus.c
+++ b/unit/test-dbus.c
@@ -35,6 +35,10 @@
 #define WAIT_ANY (-1) /* Any process */
 #endif
 
+#ifndef WAIT_ANY
+#define WAIT_ANY (-1)
+#endif
+
 #define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
 
 static pid_t dbus_daemon_pid = -1;
-- 
2.23.0

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

* Re: [PATCH] unit: fix build with musl libc
  2019-10-03 15:03 [PATCH] unit: fix build with musl libc Natanael Copa
@ 2019-10-03 15:58 ` Denis Kenzior
  2019-10-09  9:33   ` Natanael Copa
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Kenzior @ 2019-10-03 15:58 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]

Hi Natanael,

On 10/3/19 10:03 AM, Natanael Copa wrote:
> Define WAIT_ANY if needed. It is not specified in POSIX so we cannot
> expect it to be defined.
> 
> This fixes build with musl libc.
> ---
>   unit/test-dbus-message-fds.c | 4 ++++
>   unit/test-dbus-properties.c  | 4 ++++
>   unit/test-dbus.c             | 4 ++++
>   3 files changed, 12 insertions(+)
> 
> diff --git a/unit/test-dbus-message-fds.c b/unit/test-dbus-message-fds.c
> index 6f68bae..6a23141 100644
> --- a/unit/test-dbus-message-fds.c
> +++ b/unit/test-dbus-message-fds.c
> @@ -41,6 +41,10 @@
>   #define WAIT_ANY (-1) /* Any process */
>   #endif
>   
> +#ifndef WAIT_ANY
> +#define WAIT_ANY (-1)
> +#endif
> +

I'm confused.  Don't we have the exact same 3 lines just above?

>   #define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
>   
>   static pid_t dbus_daemon_pid = -1;

Regards,
-Denis

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

* Re: [PATCH] unit: fix build with musl libc
  2019-10-03 15:58 ` Denis Kenzior
@ 2019-10-09  9:33   ` Natanael Copa
  0 siblings, 0 replies; 3+ messages in thread
From: Natanael Copa @ 2019-10-09  9:33 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]

On Thu, 3 Oct 2019 10:58:53 -0500
Denis Kenzior <denkenz@gmail.com> wrote:

> Hi Natanael,
> 
> On 10/3/19 10:03 AM, Natanael Copa wrote:
> > Define WAIT_ANY if needed. It is not specified in POSIX so we cannot
> > expect it to be defined.
> > 
> > This fixes build with musl libc.
> > ---
> >   unit/test-dbus-message-fds.c | 4 ++++
> >   unit/test-dbus-properties.c  | 4 ++++
> >   unit/test-dbus.c             | 4 ++++
> >   3 files changed, 12 insertions(+)
> > 
> > diff --git a/unit/test-dbus-message-fds.c b/unit/test-dbus-message-fds.c
> > index 6f68bae..6a23141 100644
> > --- a/unit/test-dbus-message-fds.c
> > +++ b/unit/test-dbus-message-fds.c
> > @@ -41,6 +41,10 @@
> >   #define WAIT_ANY (-1) /* Any process */
> >   #endif
> >   
> > +#ifndef WAIT_ANY
> > +#define WAIT_ANY (-1)
> > +#endif
> > +  
> 
> I'm confused.  Don't we have the exact same 3 lines just above?
> 
> >   #define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"
> >   
> >   static pid_t dbus_daemon_pid = -1;  

Yup, sorry, my bad.

This was fixed in commit 696c8eac917e (unit: Define WAIT_ANY if
necessary). I didn't pay enough attention when upstreaming the patch we
use in Alpine.

Sorry.

-nc

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

end of thread, other threads:[~2019-10-09  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 15:03 [PATCH] unit: fix build with musl libc Natanael Copa
2019-10-03 15:58 ` Denis Kenzior
2019-10-09  9:33   ` Natanael Copa

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.