summaryrefslogtreecommitdiff
path: root/src/fl_write_png.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-12-01 13:38:55 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-12-01 13:38:55 +0100
commit2db94dcb4c5bf2ef3fa92f1cd6a41f3f90105361 (patch)
tree30b7aede0ccd5b42e0d6b179b6ea399704fe9458 /src/fl_write_png.cxx
parent36af6a57295a5f3c674134cab60dc644c96e97fa (diff)
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.
Diffstat (limited to 'src/fl_write_png.cxx')
-rw-r--r--src/fl_write_png.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fl_write_png.cxx b/src/fl_write_png.cxx
index 45e4da7ac..6d9c7fe89 100644
--- a/src/fl_write_png.cxx
+++ b/src/fl_write_png.cxx
@@ -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