picotcp: fix alloca on freebsd

This commit is contained in:
scribam 2021-11-27 12:22:14 +01:00 committed by flyinghead
parent 8164c96379
commit 3f50baa318
1 changed files with 4 additions and 2 deletions

View File

@ -8,15 +8,17 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
// Note: alloca is not part of POSIX
// find definition of alloca if it's not in stdlib.h:
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h>
#else
#endif
#if defined(__linux__) || defined(__sun__)
#include <alloca.h>
#endif
/*
#define MEMORY_MEASURE
#define TIME_PRESCALE