DCurrent / openbor

OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more!
http://www.chronocrash.com
BSD 3-Clause "New" or "Revised" License
901 stars 121 forks source link

Fix build on modern systems. #264

Closed resadent closed 8 months ago

resadent commented 2 years ago

Mallinfo is deprecated. Changed all the occurrences with mallinfo2. Now builds in newer systems. Fixes #243.

Plombo commented 2 years ago

This is going to break compilation on systems without glibc >= 2.33. It doesn't look like there's a simple feature macro to check whether mallinfo2 is supported, so we should probably #include <features.h> and wrap the mallinfo2 call around an #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 33) to remain compatible with everything.

DCurrent commented 2 years ago

Sorry it took me so long to see this. I defer to @Plombo. Appreciate the contribution, but I can't approve a change that breaks that much across the board.

resadent commented 2 years ago

Thank you for the comments and the review. I will have a look to @Plombo's comments to see if I can fix compilation on older builds 😀 .

msmalik681 commented 8 months ago

Just fixed this https://github.com/DCurrent/openbor/pull/287 so we can close this down.