LegalizeAdulthood / iterated-dynamics

Iterated Dynamics is an open source fractal generator with support for many fractal types.
https://legalizeadulthood.github.io/iterated-dynamics/
GNU General Public License v3.0
25 stars 9 forks source link

#include <ctime> missing in unix/d_x11.cpp #139

Closed andreasbaumann closed 1 month ago

andreasbaumann commented 1 month ago
[  8%] Building CXX object unix/CMakeFiles/os.dir/d_x11.cpp.o
/data/work/arch/iterated-dynamics-1.0.0/unix/d_x11.cpp: In member function ‘void X11Driver::flush_output()’:
/data/work/arch/iterated-dynamics-1.0.0/unix/d_x11.cpp:2297:13: error: ‘time’ was not declared in this scope
 2297 |             time(&start);
      |             ^~~~
/data/work/arch/iterated-dynamics-1.0.0/unix/d_x11.cpp:62:1: note: ‘time’ is defined in header ‘<ctime>’; this is probably fixable by adding ‘#include <ctime>’
   61 | #include "intro.h"
  +++ |+#include <ctime>
   62 | 
/data/work/arch/iterated-dynamics-1.0.0/unix/d_x11.cpp:2302:26: error: ‘time’ was not declared in this scope
 2302 |             time_t now = time(nullptr);
      |                          ^~~~
/data/work/arch/iterated-dynamics-1.0.0/unix/d_x11.cpp:2302:26: note: ‘time’ is defined in header ‘<ctime>’; this is probably fixable by adding ‘#include <ctime>’
make[2]: *** [unix/CMakeFiles/os.dir/build.make:76: unix/CMakeFiles/os.dir/d_x11.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1644: unix/CMakeFiles/os.dir/all] Error 2

This is with gcc 14.2.1 on ArchLinux.

andreasbaumann commented 1 month ago

Probably irrelevant as X11 is going to be replaced by wxWidgets anyway.

LegalizeAdulthood commented 1 month ago

I'll fix it anyway; odd that the CI linux job on github didn't complain; must be a transitive include from something