compiling FreeBSD date on Linux

Roland Smith rsmith at
Sat May 23 21:33:04 UTC 2009

On Sat, May 23, 2009 at 05:00:08PM -0300, francis keyes wrote:
>  I added "#include <time.h>" to date .c but still get some errors:
>  date.c: In function *setthetime*:
>  date.c:192: warning: assignment makes pointer from integer without a cast
>  /tmp/ccZTmvsY.o: In function `netsettime':
>  netdate.c:(.text+0x1f1): undefined reference to `strlcpy'
>  collect2: ld returned 1 exit status

Try replacing strlcpy with strncpy. The latter is standard C, although
somewhat less safe.

[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list