gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ✘gpsd .23.2~rc1


From: James Browning
Subject: Re: ✘gpsd .23.2~rc1
Date: Sat, 9 Apr 2022 12:19:09 -0700

On Sat, Apr 9, 2022 at 12:07 PM Gary E. Miller <gem@rellim.com> wrote:
Yo Hal!

On Sat, 09 Apr 2022 11:24:08 -0700
Hal Murray <halmurray@sonic.net> wrote:

> gem@rellim.com said:
> >>> So scons is mistaking musl for glibc.  Any easy way for scons to
> >>> know you are using musl? 
> >> My guess is that the best thing to do is test the type of
> >> strerror_r 
> > Any ideas how to do that?   
>
> The standard way.  Run a test case and see if it works.

The more I pinder this, the more I know we need to know if this
is not globc.  gpsd depends on _GNU_SOURCE to turn on a lot of code
in system includes.

There are no eternal guarantees. Tomorrow some will probably copy it to a wrong system and expect help.
Today, it's me. Just as a toy, consider the following.

$ head -n 50 splot.c
#include <string.h>

RET faux(int errnum, char *strerrbuf, size_t buflen) {
        return strerror_r(errnum, strerrbuf, buflen);
}
$ gcc -Werror -DRET="int" -c -o splot.{o,c}
$ gcc -Werror -DRET="char *" -c -o splot.{o,c}
splot.c:4:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'char *' [-Werror,-Wint-conversion]
        return strerror_r(errnum, strerrbuf, buflen);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
$

reply via email to

[Prev in Thread] Current Thread [Next in Thread]