picotcp: fix alloca on freebsd
This commit is contained in:
parent
8164c96379
commit
3f50baa318
|
@ -8,15 +8,17 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
// Note: alloca is not part of POSIX
|
// Note: alloca is not part of POSIX
|
||||||
|
// find definition of alloca if it's not in stdlib.h:
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#else
|
#endif
|
||||||
|
#if defined(__linux__) || defined(__sun__)
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define MEMORY_MEASURE
|
#define MEMORY_MEASURE
|
||||||
#define TIME_PRESCALE
|
#define TIME_PRESCALE
|
||||||
|
|
Loading…
Reference in New Issue