diff options
Diffstat (limited to 'ldso/include/ldso.h')
-rw-r--r-- | ldso/include/ldso.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index 81ae78d2b..621236fdf 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -15,3 +15,18 @@ # define PAGE_SHIFT 12 # define PAGE_SIZE (1UL << PAGE_SHIFT) #endif + +/* Prepare for the case that `__builtin_expect' is not available. */ +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#define __builtin_expect(x, expected_value) (x) +#endif +#ifndef likely +# define likely(x) __builtin_expect((!!(x)),1) +#endif +#ifndef unlikely +# define unlikely(x) __builtin_expect((!!(x)),0) +#endif +#ifndef __LINUX_COMPILER_H +#define __LINUX_COMPILER_H +#endif + |