diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-04-20 16:17:17 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-04-20 16:17:17 +0000 |
commit | 334673e99af03698b6aa4771749dd4cde5cfe973 (patch) | |
tree | 095bb0857d820953219ede42fda7bc07c5c1a5c0 | |
parent | d40e0a8c92e192704bfec1ba7b3abad0f27f2151 (diff) |
build fixes for minor zaptel tools (bug #4039)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@630 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | Makefile | 5 | ||||
-rwxr-xr-x | fxsdump.c | 8 | ||||
-rwxr-xr-x | patgen.c | 7 | ||||
-rwxr-xr-x | patlooptest.c | 12 | ||||
-rwxr-xr-x | pattest.c | 7 | ||||
-rwxr-xr-x | timertest.c | 7 | ||||
-rwxr-xr-x | ztdiag.c | 7 |
7 files changed, 42 insertions, 11 deletions
@@ -236,7 +236,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 fxotune: fxotune.o $(CC) -o fxotune fxotune.o -lm @@ -247,6 +247,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 @@ -5,8 +5,14 @@ #include <string.h> #include <errno.h> #include <sys/ioctl.h> -#include <linux/zaptel.h> #include <math.h> +#include <netinet/in.h> + +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include <linux/zaptel.h> +#endif #include "coeffs.h" @@ -2,7 +2,6 @@ #include <fcntl.h> #include <string.h> #include <errno.h> -#include <linux/zaptel.h> #include <stdio.h> #include <linux/types.h> #include <linux/ppp_defs.h> @@ -11,6 +10,12 @@ #include <stdlib.h> #include "bittest.h" +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include <linux/zaptel.h> +#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 <fcntl.h> #include <string.h> #include <errno.h> -#include <linux/zaptel.h> #include <stdio.h> #include <linux/types.h> #include <linux/ppp_defs.h> @@ -11,6 +10,12 @@ #include <stdlib.h> #include <time.h> +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include <linux/zaptel.h> +#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; @@ -2,7 +2,6 @@ #include <fcntl.h> #include <string.h> #include <errno.h> -#include <linux/zaptel.h> #include <stdio.h> #include <linux/types.h> #include <linux/ppp_defs.h> @@ -11,6 +10,12 @@ #include <stdlib.h> #include "bittest.h" +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include <linux/zaptel.h> +#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 <sys/select.h> #include <sys/time.h> #include <errno.h> + +#ifdef STANDALONE_ZAPATA #include "zaptel.h" +#else +#include <linux/zaptel.h> +#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); } @@ -1,9 +1,14 @@ #include <sys/ioctl.h> -#include <linux/zaptel.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#ifdef STANDALONE_ZAPATA +#include "zaptel.h" +#else +#include <linux/zaptel.h> +#endif + int main(int argc, char *argv[]) { int fd; |