lib/utils.c: improve header include order

Don't assume that lib_common.h and libdeflate.h don't include
<stdlib.h>.  Currently this change doesn't matter unless someone uses
-DFREESTANDING for a Windows build, which isn't supported anyway, but we
might as well clean this up.

Update https://github.com/ebiggers/libdeflate/pull/68
This commit is contained in:
Eric Biggers 2020-10-04 09:04:05 -07:00
parent 5f732c1524
commit 303aecb074

View File

@ -25,6 +25,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "lib_common.h"
#include "libdeflate.h"
#ifdef FREESTANDING
# define malloc NULL
# define free NULL
@ -32,10 +36,6 @@
# include <stdlib.h>
#endif
#include "lib_common.h"
#include "libdeflate.h"
static void *(*libdeflate_malloc_func)(size_t) = malloc;
static void (*libdeflate_free_func)(void *) = free;