oath-toolkit-help
[Top][All Lists]
Advanced

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

Re: Please help me locate Windows binaries


From: David Woodhouse
Subject: Re: Please help me locate Windows binaries
Date: Tue, 12 Nov 2019 12:48:00 +0200

On Mon, 2019-11-11 at 10:32 -0500, Martin Vorbrodt wrote:
> Hi there!
> My name is Martin Vorbrodt, and I used oath toolkit for an example
> program that generates OTP: 
> https://vorbrodt.blog/2019/03/20/two-factor-authentication/
> 
> I was able to compile it on Linux and Mac, but not on Windows. I can
> not locate source for binaries for windows. Could some please help me
> with this?
> 
> I recently started porting all my blog code examples to windows VC
> 2019 and this (and two others) is the one I still need to port.

I would probably go for just building with mingw32 on Linux.

Not that it builds, but it shouldn't be hard to fix...

  CC       usersfile.lo
usersfile.c: In function 'parse_usersfile':
usersfile.c:175:9: warning: implicit declaration of function 'strptime'; did 
you mean 'strftime'? [-Wimplicit-function-declaration]
    ts = strptime (p, TIME_FORMAT_STRING, &tm);
         ^~~~~~~~
         strftime
usersfile.c:175:7: warning: assignment to 'char *' from 'int' makes pointer 
from integer without a cast [-Wint-conversion]
    ts = strptime (p, TIME_FORMAT_STRING, &tm);
       ^
usersfile.c: In function 'update_usersfile':
usersfile.c:340:18: error: storage size of 'l' isn't known
     struct flock l;
                  ^
usersfile.c:346:16: error: 'F_WRLCK' undeclared (first use in this function)
     l.l_type = F_WRLCK;
                ^~~~~~~
usersfile.c:346:16: note: each undeclared identifier is reported only once for 
each function it appears in
usersfile.c:348:18: warning: implicit declaration of function 'fcntl'; did you 
mean 'fcvt'? [-Wimplicit-function-declaration]
     while ((rc = fcntl (fileno (lockfh), F_SETLKW, &l)) < 0 && errno == EINTR)
                  ^~~~~
                  fcvt
usersfile.c:348:42: error: 'F_SETLKW' undeclared (first use in this function)
     while ((rc = fcntl (fileno (lockfh), F_SETLKW, &l)) < 0 && errno == EINTR)
                                          ^~~~~~~~
usersfile.c:340:18: warning: unused variable 'l' [-Wunused-variable]
     struct flock l;
                  ^
usersfile.c:389:24: warning: implicit declaration of function 'fsync' 
[-Wimplicit-function-declaration]
   if (rc == OATH_OK && fsync (fileno (outfh)) != 0)
                        ^~~~~
usersfile.c: In function 'oath_authenticate_usersfile':
usersfile.c:475:11: warning: implicit declaration of function 'localtime_r'; 
did you mean 'localtime_s'? [-Wimplicit-function-declaration]
       if (localtime_r (&t, &now) == NULL)
           ^~~~~~~~~~~
           localtime_s
usersfile.c:475:34: warning: comparison between pointer and integer
       if (localtime_r (&t, &now) == NULL)
                                  ^~


Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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