From 49d601cbf2f50bfa21bc62f48ded01eb7f768d8a Mon Sep 17 00:00:00 2001 From: russell Date: Thu, 12 May 2005 02:26:49 +0000 Subject: fix some compilation issues (bug #4039) git-svn-id: http://svn.digium.com/svn/zaptel/branches/v1-0@643 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- Makefile | 5 ++++- fxsdump.c | 8 +++++++- patgen.c | 7 ++++++- patlooptest.c | 12 +++++++----- pattest.c | 7 ++++++- timertest.c | 7 ++++++- ztdiag.c | 7 ++++++- 7 files changed, 42 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 635f81c..993a0fb 100755 --- a/Makefile +++ b/Makefile @@ -225,7 +225,7 @@ usbfxstest: usbfxstest.o $(CC) -o usbfxstest usbfxstest.o -lzap fxstest: fxstest.o - $(CC) -o fxstest fxstest.o -ltonezone + $(CC) -o fxstest fxstest.o -L. -ltonezone -lm fxsdump: fxsdump.o $(CC) -o fxsdump fxsdump.o -lm @@ -233,6 +233,9 @@ fxsdump: fxsdump.o stackcheck: checkstack $(BUILDVER) ./checkstack *.o +ztdiag: ztdiag.o + $(CC) -o ztdiag ztdiag.o + devices: ifeq ($(DYNFS),) mkdir -p $(INSTALL_PREFIX)/dev/zap diff --git a/fxsdump.c b/fxsdump.c index 0451ca3..c3c247e 100755 --- a/fxsdump.c +++ b/fxsdump.c @@ -5,8 +5,14 @@ #include #include #include -#include #include +#include + +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include +#endif #include "coeffs.h" diff --git a/patgen.c b/patgen.c index 6ee48f5..a137a2a 100755 --- a/patgen.c +++ b/patgen.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -11,6 +10,12 @@ #include #include "bittest.h" +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include +#endif + /* #define BLOCK_SIZE 2048 */ #define BLOCK_SIZE 2041 diff --git a/patlooptest.c b/patlooptest.c index 2f3f2c7..fd1a054 100755 --- a/patlooptest.c +++ b/patlooptest.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -11,6 +10,12 @@ #include #include +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include +#endif + #define BLOCK_SIZE 2039 void print_packet(unsigned char *buf, int len) @@ -25,8 +30,7 @@ void print_packet(unsigned char *buf, int len) int main(int argc, char *argv[]) { int fd; - int fd2; - int ires, res, x; + int res, x; int i; ZT_PARAMS tp; int bs = BLOCK_SIZE; @@ -34,8 +38,6 @@ int main(int argc, char *argv[]) unsigned char c=0,c1=0; unsigned char inbuf[BLOCK_SIZE]; unsigned char outbuf[BLOCK_SIZE]; - unsigned int fcs; - static int packets=0; int setup=0; int errors=0; int bytes=0; diff --git a/pattest.c b/pattest.c index e694619..e95cc48 100755 --- a/pattest.c +++ b/pattest.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -11,6 +10,12 @@ #include #include "bittest.h" +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include +#endif + #define BLOCK_SIZE 2039 void print_packet(unsigned char *buf, int len) diff --git a/timertest.c b/timertest.c index 5849e21..df224b2 100755 --- a/timertest.c +++ b/timertest.c @@ -7,7 +7,12 @@ #include #include #include + +#ifdef STANDALONE_ZAPATA #include "zaptel.h" +#else +#include +#endif int main(int argc, char *argv[]) { @@ -43,7 +48,7 @@ int main(int argc, char *argv[]) exit(1); } gettimeofday(&now, NULL); - printf("Timer Expired (%d ms)!\n", (now.tv_sec - orig.tv_sec) * 1000 + (now.tv_usec - orig.tv_usec) / 1000); + printf("Timer Expired (%ld ms)!\n", (now.tv_sec - orig.tv_sec) * 1000 + (now.tv_usec - orig.tv_usec) / 1000); } exit(0); } diff --git a/ztdiag.c b/ztdiag.c index 3db5b7f..a1e476c 100755 --- a/ztdiag.c +++ b/ztdiag.c @@ -1,9 +1,14 @@ #include -#include #include #include #include +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include +#endif + int main(int argc, char *argv[]) { int fd; -- cgit v1.2.3