FLTK logo

[master] 2db94dc - Hack to restore "configure --enable-x11" on macOS ≥ 11

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 2db94dc - Hack to restore "configure --enable-x11" on macOS ≥ 11 "ManoloFLTK" Dec 01, 2021  
 
commit 2db94dcb4c5bf2ef3fa92f1cd6a41f3f90105361
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Dec 1 13:38:55 2021 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Dec 1 13:38:55 2021 +0100

    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.

 src/fl_write_png.cxx | 1 +
 1 file changed, 1 insertion(+)

diff --git src/fl_write_png.cxx src/fl_write_png.cxx
index 45e4da7..6d9c7fe 100644
--- src/fl_write_png.cxx
+++ 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
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.