Skip to content

Commit

Permalink
Fix issue #397 occuring with recent versions of the MinGW compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni committed Mar 21, 2021
1 parent 518f2a7 commit edea29d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/JSBSim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ int real_main(int argc, char* argv[])
time_t tod;
time(&tod);
struct tm local;
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__MINGW32__)
localtime_s(&local, &tod);
#else
localtime_r(&tod, &local);
Expand Down Expand Up @@ -565,7 +565,7 @@ int real_main(int argc, char* argv[])

// PRINT ENDING CLOCK TIME
time(&tod);
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__MINGW32__)
localtime_s(&local, &tod);
#else
localtime_r(&tod, &local);
Expand Down
2 changes: 1 addition & 1 deletion src/models/flight_control/FGMagnetometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ FGMagnetometer::FGMagnetometer(FGFCS* fcs, Element* element)
time_t rawtime;
time( &rawtime );
struct tm ptm;
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__MINGW32__)
gmtime_s(&ptm, &rawtime);
#else
gmtime_r(&rawtime, &ptm);
Expand Down

0 comments on commit edea29d

Please sign in to comment.