diff options
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 01d0c0635..d13fe010c 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -1,5 +1,5 @@ /* - * $Id: compat.h,v 1.29 2005/11/06 17:01:47 mchehab Exp $ + * $Id: compat.h,v 1.30 2005/11/08 17:46:27 nsh Exp $ */ #ifndef _COMPAT_H @@ -235,6 +235,16 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr) }) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) +#define kzalloc(size, flags) \ +({ \ + void *__ret = kmalloc(size, flags); \ + if (__ret) \ + memset(__ret, 0, size); \ + __ret; \ +}) +#endif + #endif /* * Local variables: |