<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#444444"><br></div><div class="gmail_extra"><div class="gmail_quote">On 30 September 2016 at 12:59, Eric Engestrom <span dir="ltr"><<a href="mailto:eric.engestrom@imgtec.com" target="_blank">eric.engestrom@imgtec.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Sep 30, 2016 at 11:36:24AM +0100, Murray Calavera wrote:<br>
> On 30 September 2016 at 11:10, Eric Engestrom <<a href="mailto:eric.engestrom@imgtec.com" target="_blank">eric.engestrom@imgtec.com</a>><br>
> wrote:<br>
><br>
> > On Thu, Sep 29, 2016 at 09:26:16PM +0100, Murray Calavera wrote:<br>
> > > error.h is a gnu extension and not available in other<br>
> > > popular libcs like musl. This patch provides a replacement.<br>
> > ><br>
> > > Signed-off-by: Murray Calavera <<a href="mailto:murray.calavera@gmail.com" target="_blank">murray.calavera@gmail.com</a>><br>
> ><br>
> > How did you test this? For me, `CC=musl-gcc ./autogen.sh` stops on:<br>
> >   [...]<br>
> >   checking for library containing pam_open_session... no<br>
> >   configure: error: weston-launch requires pam<br>
> ><br>
><br>
> Have you got libpam installed?<br>
> I don't see how this patch could have affected the configure,<br>
> does it configure without this patch?<br>
<br>
I do have it, and it works fine with both `CC=gcc` and `CC=clang`, but<br>
`CC=musl-gcc` and `CC=musl-clang` both fail with that error.<br>
<br>
Is this also how you use musl?  If it is, then the issue is probably on<br>
my side, I won't take anymore of your time with this :)<br></blockquote><div><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">​I have a native musl toolchain. The musl-gcc wrapper modifies</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">include and library paths​ so perhaps that is the issue.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">Also what Armin said.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
><br>
> ><br>
> > The code looks good though (with one nit-pick), so even if I couldn't<br>
> > test it, it is:<br>
> > Reviewed-by: Eric Engestrom <<a href="mailto:eric.engestrom@imgtec.com" target="_blank">eric.engestrom@imgtec.com</a>><br>
> ><br>
> > > ---<br>
> > >  libweston/weston-launch.c | 20 +++++++++++++++++++-<br>
> > >  1 file changed, 19 insertions(+), 1 deletion(-)<br>
> > ><br>
> > > diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c<br>
> > > index 140fde1..84f7d60 100644<br>
> > > --- a/libweston/weston-launch.c<br>
> > > +++ b/libweston/weston-launch.c<br>
> > > @@ -33,7 +33,6 @@<br>
> > >  #include <poll.h><br>
> > >  #include <errno.h><br>
> > ><br>
> > > -#include <error.h><br>
> > >  #include <getopt.h><br>
> > ><br>
> > >  #include <sys/types.h><br>
> > > @@ -112,6 +111,25 @@ struct weston_launch {<br>
> > ><br>
> > >  union cmsg_data { unsigned char b[4]; int fd; };<br>
> > ><br>
> > > +static void<br>
> > > +error(int status, int errnum, const char *msg, ...)<br>
> > > +{<br>
> > > +     va_list args;<br>
> > > +<br>
> > > +     fputs("weston-launch: ", stderr);<br>
> > > +     va_start(args, msg);<br>
> > > +     vfprintf(stderr, msg, args);<br>
> > > +     va_end(args);<br>
> > > +<br>
> > > +     if (errnum)<br>
> > > +             fprintf(stderr, ": %s\n", strerror(errnum));<br>
> > > +     else<br>
> > > +             fputc('\n', stderr);<br>
> ><br>
> > Why not `fprintf(stderr, "\n");`?<br>
> > While fputc() is enough since this is a single char, the use of<br>
> > a different function here looks... odd.<br>
> ><br>
><br>
> As you said, because I'm not printing formatted data<br>
> there is no need to use printf.<br>
> However if the consensus here is to use printf even<br>
> when not needed, I can change that.<br>
<br>
I just thought it looked odd, but I have no real argument one way or the<br>
other, so feel free to leave it as is :)<br>
<br>
Cheers,<br>
  Eric<br>
<br>
><br>
> ><br>
> > > +<br>
> > > +     if (status)<br>
> > > +             exit(status);<br>
> > > +}<br>
> > > +<br>
> > >  static gid_t *<br>
> > >  read_groups(void)<br>
> > >  {<br>
> > > --<br>
> > > 2.10.0<br>
> ><br>
</blockquote></div><br></div></div>