[sheepdog] [PATCH v3 2/3] modify implemention of functions to build sheepdog on rhel5 environment

Liu Yuan namei.unix at gmail.com
Wed Aug 21 12:25:29 CEST 2013


On Wed, Aug 21, 2013 at 05:54:11PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai at taobao.com>
> 
> For using timerfd, eventfd, signalfd, it need to use syscall() instead of glibc's
> standard fucntions on rhel5.
> 
> Signed-off-by: Robin Dong <sanbai at taobao.com>
> ---
>  include/bitops.h          |    6 ++--
>  include/compiler.h        |   85 +++++++++++++++++++++++++++++++++++++++++++++
>  include/util.h            |    1 -
>  lib/event.c               |    1 -
>  lib/util.c                |    3 --
>  lib/work.c                |    1 -
>  sheep/cluster/local.c     |    1 -
>  sheep/cluster/shepherd.c  |    1 -
>  sheep/cluster/zookeeper.c |    1 -
>  sheep/sheep.c             |    1 -
>  shepherd/shepherd.c       |    1 -
>  11 files changed, 88 insertions(+), 14 deletions(-)
> 
> diff --git a/include/bitops.h b/include/bitops.h
> index c2ff3e7..c4e8f74 100644
> --- a/include/bitops.h
> +++ b/include/bitops.h
> @@ -157,7 +157,7 @@ static inline void clear_bit(unsigned int nr, unsigned long *addr)
>   * set bit if value is nonzero. The last (most significant) bit is
>   * at position 64.
>   */
> -#if __SIZEOF_LONG__ == 4
> +#if SIZEOF_LONG == 4
>  static __always_inline int fls64(uint64_t x)
>  {
>  	uint32_t h = x >> 32;
> @@ -169,7 +169,7 @@ static __always_inline int fls64(uint64_t x)
>  		return 64 - __builtin_clzl(h);
>  	return 32 - __builtin_clzl(x);
>  }
> -#elif __SIZEOF_LONG__ == 8
> +#elif SIZEOF_LONG == 8
>  static __always_inline int fls64(uint64_t x)
>  {
>  	if (x == 0)
> @@ -177,7 +177,7 @@ static __always_inline int fls64(uint64_t x)
>  	return 64 - __builtin_clzl(x);
>  }
>  #else
> -#error __SIZEOF_LONG__ not 4 or 8
> +#error SIZEOF_LONG not 4 or 8
>  #endif

These should go into patch 1/3

Thanks
Yuan



More information about the sheepdog mailing list