Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 2009 17:00:08 -0300
From:      francis keyes <fkeymo@gmail.com>
To:        Roland Smith <rsmith@xs4all.nl>
Cc:        Polytropon <freebsd@edvax.de>, Chuck Robey <chuckr@telenix.org>, freebsd-questions@freebsd.org
Subject:   Re: compiling FreeBSD date on Linux
Message-ID:  <d64607cc0905231300lda83df3v65d61d88d207b1a2@mail.gmail.com>
In-Reply-To: <20090522075840.GA94412@slackbox.xs4all.nl>
References:  <d64607cc0905191419p621f7e65tf5515d1d3696bfa0@mail.gmail.com> <20090520000137.3d46fcb2.freebsd@edvax.de> <4A135119.8010007@telenix.org> <d64607cc0905201045i36084a34g2a6c0d4e9d5f750d@mail.gmail.com> <20090520192011.GA97805@slackbox.xs4all.nl> <d64607cc0905211708u2d2c4e75q95a804f70ce03eb7@mail.gmail.com> <20090522075840.GA94412@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
I added "#include <time.h>" to date .c but still get some errors:

date.c: In function =91setthetime=92:
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

I tried downloading the source to strlcpy and compiling with everything
else:
gcc -o date date.c netdate.c vary.c strlcpy.c

It compiles now with the warning:
date.c: In function =91setthetime=92:
date.c:192: warning: assignment makes pointer from integer without a cast


... but it doesn't work.  The output of "./date" is:

%+


I'm going to keep playling with it...


On Fri, May 22, 2009 at 4:58 AM, Roland Smith <rsmith@xs4all.nl> wrote:

> On Thu, May 21, 2009 at 09:08:31PM -0300, francis keyes wrote:
> >  I patched date.c and tried to compile but I get a few errors, as you
> suspected:
> >
> >  In file included from date.c:59:
> >  vary.h:35: warning: *struct tm* declared inside parameter list
> >  vary.h:35: warning: its scope is only this definition or declaration,
> which is probably not what
> >  you want
> >  date.c: In function *main*:
> >  date.c:85: error: storage size of *lt* isn*t known
>
> Add "#include <time.h>" to date.c.
>
> Roland
> --
> R.F.Smith                                   http://www.xs4all.nl/~rsmith/=
<http://www.xs4all.nl/%7Ersmith/>;
> [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
> pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d64607cc0905231300lda83df3v65d61d88d207b1a2>