diff options
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 01847a319..49b04961f 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -554,6 +554,13 @@ static inline struct proc_dir_entry *proc_create(const char *a, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) #define div64_u64(a,b) div64_64(a,b) + +#define clamp( x, l, h ) max_t( __typeof__( x ), \ + ( l ), \ + min_t( __typeof__( x ), \ + ( h ), \ + ( x ) ) ) + #endif #endif |