diff options
-rw-r--r-- | v4l/compat.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index e73f03087..51e4408d4 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -72,6 +72,15 @@ #define vmalloc_32_user(a) vmalloc_32(a) #endif +#ifndef DIV_ROUND_CLOSEST +#define DIV_ROUND_CLOSEST(x, divisor)( \ +{ \ + typeof(divisor) __divisor = divisor; \ + (((x) + ((__divisor) / 2)) / (__divisor)); \ +} \ +) +#endif + #ifdef NEED_BOOL_TYPE /* bool type and enum-based definition of true and false was added in 2.6.19 */ typedef int bool; |