Browse Source

JNI-174 Wrap __LP64__ related stuff into ifdef ANDROID to keep JNI-158 and don't break dates on android.

On android32 bits time_t struct it is 32 bits and this is causing an overflow after 01/Feb/22 giving negative dates and therefore converting from 09/02/22 to 25/02/21.
JNI-172 Release_2.1.40
Hussein Kasem 3 years ago
committed by heck
parent
commit
56d71a5b4c
  1. 17
      src/cxx/jniutils.cc

17
src/cxx/jniutils.cc

@ -1,16 +1,17 @@
#include <cassert>
#include "jniutils.hh" #include "jniutils.hh"
#include <pEp/pEpLog.hh> #include <pEp/pEpLog.hh>
#include <cassert>
#include <cstring>
#ifndef __LP64__ #ifdef ANDROID
#ifndef __LP64__
#include <time64.h> #include <time64.h>
#define time_t time64_t #define time_t time64_t
#define timegm timegm64 #define timegm timegm64
#define gmtime_r gmtime64_r #define gmtime_r gmtime64_r
#else #endif
#include <string.h>
#endif #endif
namespace pEp { namespace pEp {

Loading…
Cancel
Save