richgel999 / jpeg-compressor

C++ JPEG compression/fuzzed low-RAM JPEG decompression codec with Public Domain or Apache 2.0 license
210 stars 57 forks source link

macOS build: fatal error: 'malloc.h' file not found #17

Open glebm opened 3 years ago

glebm commented 3 years ago
jpge.cpp:35:10: fatal error: 'malloc.h' file not found
#include <malloc.h>

https://github.com/hrydgard/ppsspp/pull/14016/checks?check_run_id=1797191251

mlprojn commented 2 years ago

Since malloc is included from stdlib.h already on macOS you can replace that line with

#ifndef __APPLE__
#include <malloc.h>
#endif
glebm commented 2 years ago

@mlprojn malloc.h is a long-deprecated header and should not be included at all, on any platform. I sent a pull request on the same day I filed the issue but it hasn't been looked at by @richgel999 yet https://github.com/richgel999/jpeg-compressor/pull/18

colinator commented 8 months ago

Hey, it'd be nice to get this sorted...