Subject: Re: how to correct compiler warning "implicit declaration of function ..."
To: None <netbsd-users@netbsd.org>
From: Henry Nelson <henry@irm.nara.kindai.ac.jp>
List: netbsd-users
Date: 03/29/2001 20:16:14
> > Keep getting from the compiler (egcs-1.1.1 on NetBSD1.4.2):

Sorry, my mistake.  Actually, it is "NetBSD 1.4.3_ALPHA."

> >      "warning: implicit declaration of function `strlcat'"  (or `strlcpy')
> > 
> > The offending code looks like:
> >      "strlcat(logformat, argv[i], sizeof(logformat));"
> >      (or    "strlcpy(statefn, optarg, sizeof(statefn));")
> > 
> > How would you tweak the code to avoid the warning?  TIA
> 
> ----
> HISTORY
>      strlcpy() and strlcat() first appeared in OpenBSD 2.4, then in
>      NetBSD 1.4.3 and FreeBSD 3.3.0.
> ----
> 
> If you upgrade your system, you don't have to do anything. Otherwise,

It's very stange.  I have man pages for both strlcpy and strlcat, but I
don't see either of them in /usr/include/string.h.  Unfortunately
1.4.3_ALPHA is the highest available version for the pc98 machine I am on.

Thanks anyway.  It was a very good learning experience.

henry nelson