RandyGaul / cute_headers

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
4.24k stars 264 forks source link

cute_png: only #include alloca.h on Linux #337

Closed dbohdan closed 1 year ago

dbohdan commented 1 year ago

Right now cute_png does not compile out-of-the-box on NetBSD and OpenBSD because they don't have alloca.h. I think alloca.h is a Linux (GNU and musl libc) quirk. With this patch cute_png seems to work perfectly (my project's 20+ tests pass) on Net- and OpenBSD. (It likely works on FreeBSD, although I have not tested. And maybe on macOS, too?)