From a3161d36fb129719b87ecb7ab6ba93fbcb0eeb39 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 12 Oct 2008 10:53:33 -0200 Subject: Fix build breakage with kernels lower than 2.6.28 From: Mauro Carvalho Chehab This patch fixes compilation for older kernels. However, due to -alsa changes on saa7134-alsa and snd-bt878, I'm not sure if this is enough for it to really work. I suspect that something else may be needed for they to work with earlier versions. Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/compat.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/v4l/compat.h b/v4l/compat.h index 6e90c0e63..0e2ccd7a9 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -237,4 +237,17 @@ static inline int list_is_singular(const struct list_head *head) #define current_uid() (current->uid) #endif +#ifndef WARN +#define WARN(condition, format...) ({ \ + int __ret_warn_on = !!(condition); \ + if (unlikely(__ret_warn_on)) \ + printk(KERN_WARNING format); \ + unlikely(__ret_warn_on); \ +}) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) +#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) +#endif + #endif -- cgit v1.2.3