diff options
-rw-r--r-- | v4l/compat.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 |