mccdaq / uldaq

MCC Universal Library for Linux
MIT License
100 stars 36 forks source link

Build fails on armv6/armv7 #24

Closed stv0g closed 3 years ago

stv0g commented 3 years ago
#16 267.1 AiDevice.cpp: In member function 'virtual void ul::AiDevice::getCfg_CalDateStr(int, char*, unsigned int*)':
#16 267.1 AiDevice.cpp:715:23: error: cannot convert 'long int*' to 'const time_t*' {aka 'const long long int*'}
#16 267.1   715 |  timeinfo = localtime(&calDateSec);
#16 267.1       |                       ^~~~~~~~~~~
#16 267.1       |                       |
#16 267.1       |                       long int*
#16 267.1 In file included from /usr/include/pthread.h:31,
#16 267.1                  from /usr/include/c++/10.2.1/armv7-alpine-linux-musleabihf/bits/gthr-default.h:35,
#16 267.1                  from /usr/include/c++/10.2.1/armv7-alpine-linux-musleabihf/bits/gthr.h:148,
#16 267.1                  from /usr/include/c++/10.2.1/ext/atomicity.h:35,
#16 267.1                  from /usr/include/c++/10.2.1/bits/ios_base.h:39,
#16 267.1                  from /usr/include/c++/10.2.1/ios:42,
#16 267.1                  from /usr/include/c++/10.2.1/ostream:38,
#16 267.1                  from /usr/include/c++/10.2.1/iostream:39,
#16 267.1                  from ul_internal.h:12,
#16 267.1                  from AiDevice.h:10,
#16 267.1                  from AiDevice.cpp:7:
#16 267.1 /usr/include/time.h:58:23: note:   initializing argument 1 of 'tm* localtime(const time_t*)'
#16 267.1    58 | struct tm *localtime (const time_t *);
#16 267.1       |                       ^~~~~~~~~~~~~~
#16 270.4   CXX      DioConfig.lo
#16 270.7   CXX      CtrConfig.lo
#16 271.2   CXX      IoDevice.lo
sbazaz commented 3 years ago

Thanks for reporting the issue. I'm unable to duplicate the issue on my system. Could you please change the type of the calDateSec variable from long int to time_t at line 711 of the AiDevice.cpp file and recompile the library. If the change fixed the problem, let me know.