diff options
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; } |