gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Warnings from NetBSD


From: Gary E. Miller
Subject: Re: [gpsd-dev] Warnings from NetBSD
Date: Wed, 12 Jun 2019 16:12:55 -0700

Yo Hal!

On Tue, 11 Jun 2019 22:43:12 -0700
Hal Murray <address@hidden> wrote:

> We fixed these for NTPsec, but I don't remember the details.

Not really.  I just compiled NTPsec on osX and I see strlcpy() errors
there.

../../ntpd/refclock_gpsd.c:2085:6: warning: implicit declaration of function 
'strlcpy' is invalid in C99 
[-Wimplicit-function-declaration]strlcpy(pp->a_lastcode, tc, 
sizeof(pp->a_lastcode));

There are places strlcpy() works with no errors.  Partly because
include/ntp_stdlib.h has an extern strlcpy().  Which it should not as that
should be from a system include.

Strangely when I build NTPsec on osX I see no strlcpy() errors.

> I think
> there is some delicate dance of the right magic compiler/environment
> flags.  I took a quick look at include/ntp_stdlib.h but didn't see
> anything interesting.
> 
> 
> gpsutils.c:371:9: warning: implicit declaration of function
> 'strlcpy' [-Wimplicit-function-declaration] gpsd_json.c:91:7:

Works on osX.  For me osX seems close to *BSD. The old fix
for gpsutils was:

#define _DARWIN_C_SOURCE

The FreeBSD man page says that string.h fixes this, but that is
already in gpsutils.c

    https://www.unix.com/man-page/freebsd/3/strlcpy/

Same man page is in current osX.  Must need some define to unlock?

Can you look in your string.h?  Or send me a copy?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpkjnwX04Sqs.pgp
Description: OpenPGP digital signature


reply via email to

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