Skip to Content.
Sympa Menu

shibboleth-dev - adfs/handlers.cpp:364 error: epoch not declared

Subject: Shibboleth Developers

List archive

adfs/handlers.cpp:364 error: epoch not declared


Chronological Thread 
  • From: Martin Haase <>
  • To:
  • Cc: Peter Gietz <>
  • Subject: adfs/handlers.cpp:364 error: epoch not declared
  • Date: Wed, 08 Aug 2007 11:30:08 +0200
  • Organization: DAASI International GmbH

Hi,

I think I identified a bug in the 1.3 C++ SP from SVN. I tried to compile under openSuSE10.2, 64 bit and got the above error:

handlers.cpp:364 error: `epoch´ was not declared in this scope

The problem is in the lines 359-365 in /adfs/handlers.cpp

#ifndef HAVE_GMTIME_R

time_t epoch=time(NULL);

struct tm* ptime=gmtime(&epoch);

#else

struct tm res;

struct tm* ptime=gmtime_r(&epoch,&res);

#endif


that epoch does not get initialized when HAVE_GMTIME_R is unset. We fixed it by adding the line

time_t epoch=time(NULL);

to the else block. Does this make sense?

Cheers,
Martin Haase

--
-----------------------------------------------------------------------
Martin Haase
DAASI International GmbH phone: +49 7071 2970-336
Wilhelmstr. 106 Fax : +49 7071 295114
D-72074 Tübingen email:

Germany Web : http://www.daasi.de

Directory Applications for Advanced Security and Information Management
-----------------------------------------------------------------------




Archive powered by MHonArc 2.6.16.

Top of Page