SLIRP: Allow NAT networking even if pthreads are not available.

As mentioned in #284
This commit is contained in:
Mark Pizzolato 2016-03-09 10:02:13 -08:00
parent fb8f630ea9
commit 1b6f28a743

View file

@ -42,6 +42,14 @@
#include "sim_sock.h" #include "sim_sock.h"
#include "libslirp.h" #include "libslirp.h"
#if !defined (USE_READER_THREAD)
#define pthread_mutex_init(mtx, val)
#define pthread_mutex_destroy(mtx)
#define pthread_mutex_lock(mtx)
#define pthread_mutex_unlock(mtx)
#define pthread_mutex_t int
#endif
#define IS_TCP 0 #define IS_TCP 0
#define IS_UDP 1 #define IS_UDP 1
static const char *tcpudp[] = { static const char *tcpudp[] = {