Hack to restore "configure --enable-x11" on macOS ≥ 11

Since macOS 11, configure --enable-x11 (and the equivalent with CMake)
fails when compiling fl_write_png.cxx in parsing of time.h.
The error happens only if png.h is included without time.h having
been included before.
The fix is to #include time.h before png.h

A better fix than his hack is desirable.
This commit is contained in:
ManoloFLTK 2021-12-01 13:38:55 +01:00
parent 36af6a5729
commit 2db94dcb4c
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#include <FL/fl_string.h>
#include <FL/fl_utf8.h> // fl_fopen()
#include <stdio.h>
#include <time.h> // hack to restore "configure --enable-x11" on macOS ≥ 11
// PNG library include files