ngs-lang / ngs

Next Generation Shell (NGS)
https://ngs-lang.org/
GNU General Public License v3.0
1.4k stars 43 forks source link

malloc.c:22:87: error: use of undeclared identifier 'MAP_ANONYMOUS' #665

Open ryandesign opened 2 weeks ago

ryandesign commented 2 weeks ago

ngs fails to build on OS X 10.10 and earlier.

malloc.c:22:87: error: use of undeclared identifier 'MAP_ANONYMOUS'

Here's a recent build log: https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/274533/steps/install-port/logs/stdio

On older macOS and BSD, MAP_ANONYMOUS was called MAP_ANON. You could use:

#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif

I previously reported this to MacPorts: https://trac.macports.org/ticket/64195

ilyash-b commented 2 weeks ago

Do we have statistics about installations? Is anyone actually using this port on such an old system? The latest update to that version was in 2017. I don't know whether it would be a good decision to support that version.

ryandesign commented 2 weeks ago

MacPorts supports Mac OS X 10.4 and later. There are a handful of MacPorts users very passionate about supporting older systems. If you do not wish to include this simple change in your software we can fix it on the MacPorts side by using our legacy support library but I like to give upstream developers the chance to fix their software at the source so that it can benefit the largest audience.

ryandesign commented 2 weeks ago

Do we have statistics about installations?

MacPorts opt-in installation statistics are here: https://ports.macports.org/statistics/

ilyash-b commented 1 week ago

I'll need some time to get to this. Need a clean environment to experiment with. Figuring out what would be practical for me.