bbidulock / blackboxwm

A window manager for X11
Other
167 stars 28 forks source link

Fix build with GCC 12 (missing <time.h> include) #42

Closed thesamesam closed 2 years ago

thesamesam commented 2 years ago

Fixes build failure with GCC 12:

Toolbar.cc: In member function ‘void Toolbar::reconfigure()’:
Toolbar.cc:260:17: error: ‘time’ was not declared in this scope; did you mean ‘Time’?
  260 |   time_t ttmp = time(NULL);
      |                 ^~~~
      |                 Time
Toolbar.cc:265:21: error: ‘localtime’ was not declared in this scope; did you mean ‘clock_timer’?
  265 |     struct tm *tt = localtime(&ttmp);
      |                     ^~~~~~~~~
      |                     clock_timer

Bug: https://bugs.gentoo.org/851603

bbidulock commented 2 years ago

Thanks for the correction!