From 2bf1e66ace258b47890506a2ce449ff968bb879b Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 27 May 2009 20:25:11 +0000 Subject: [PATCH] Corrected demo mstpcap when building with Borland compiler. Thank you Martin! --- bacnet-stack/demo/mstpcap/main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bacnet-stack/demo/mstpcap/main.c b/bacnet-stack/demo/mstpcap/main.c index 8fb7198d..8afcaf46 100644 --- a/bacnet-stack/demo/mstpcap/main.c +++ b/bacnet-stack/demo/mstpcap/main.c @@ -48,6 +48,15 @@ #include "mstp.h" #include "mstptext.h" +#if defined(_WIN32) +#include /* _beginthread */ +#endif +#if defined(__BORLANDC__) +#include +#define _timeb timeb +#define _ftime(param) ftime(param) +#endif + #ifndef max #define max(a,b) (((a) (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) @@ -73,6 +82,8 @@ static int gettimeofday( { struct _timeb timebuffer; + (void) tzp; + _ftime(&timebuffer); tp->tv_sec = timebuffer.time; tp->tv_usec = timebuffer.millitm * 1000; @@ -113,6 +124,8 @@ void Sleep( void *milliseconds_task( void *pArg) { + (void) pArg; + for (;;) { Sleep(1); dlmstp_millisecond_timer();