From c2669b9d8699a70d302583dcfd102cc0d33cfc55 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Wed, 21 Feb 2007 04:40:34 +0000 Subject: 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 --- hpec/hpec_zaptel.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hpec') 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; } -- cgit v1.2.3