Fix compiling on OSX
This commit is contained in:
parent
b9a2351f0a
commit
2f014f55b6
|
@ -2,10 +2,17 @@
|
|||
#define ALIGNED_VECTOR_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include <malloc.h>
|
||||
#else
|
||||
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||
#define memalign(x, size) malloc((size))
|
||||
#endif
|
||||
|
||||
|
||||
#define ALIGNED_VECTOR_INITIAL_CAPACITY 256u
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
#ifndef STACK_H
|
||||
#define STACK_H
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include <malloc.h>
|
||||
#else
|
||||
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||
#define memalign(x, size) malloc((size))
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char* data;
|
||||
unsigned int capacity;
|
||||
|
|
Loading…
Reference in New Issue
Block a user