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 /hpec | |
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
Diffstat (limited to 'hpec')
-rw-r--r-- | hpec/hpec_zaptel.h | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |