diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-21 04:40:34 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-21 04:40:34 +0000 |
commit | c2669b9d8699a70d302583dcfd102cc0d33cfc55 (patch) | |
tree | 0461386ed3732f72387388b947a5ef7fb10fc098 | |
parent | 74b471726593cf7f113774bbf7a00c9c7a274ad8 (diff) |
fix HPEC builds on 2.4 kernels
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2190 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | hpec/hpec_zaptel.h | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -164,7 +164,7 @@ ifeq ($(ARCH),x86_64) ZAPTEL_HPEC:=hpec/hpec_x86_64.o_shipped endif -CFLAGS+=-DECHO_CAN_HPEC -I$(PWD)/hpec +KFLAGS+=-DECHO_CAN_HPEC -I$(PWD)/hpec zaptel-base.o: hpec/hpec_zaptel.h hpec/hpec_user.h endif diff --git a/hpec/hpec_zaptel.h b/hpec/hpec_zaptel.h index 1de9a85..b03bfe6 100644 --- a/hpec/hpec_zaptel.h +++ b/hpec/hpec_zaptel.h @@ -33,9 +33,18 @@ static int __attribute__((regparm(0))) __attribute__((format (printf, 1, 2))) lo int res; va_list args; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) va_start(args, format); res = vprintk(format, args); va_end(args); +#else + char buf[256]; + + va_start(args, format); + res = vsnprintf(buf, sizeof(buf), format, args); + va_end(args); + printk(buf); +#endif return res; } |