[x264-devel] Fix building with older versions of GCC.

Jason Garrett-Glaser darkshikari at gmail.com
Mon Jan 5 22:00:03 CET 2009


On Sun, Jan 4, 2009 at 8:45 PM, Brad <brad at comstyle.com> wrote:
> While trying to update to a newer x264 snapshot I noticed the build
> is broken since it is attempting to use a built-in GCC function
> which was introduced with GCC 3.4. The following diff fixes the
> build.
>
>
> --- common/osdep.h.orig Sat Jan  3 16:45:09 2009
> +++ common/osdep.h      Sun Jan  4 16:52:39 2009
> @@ -170,7 +170,7 @@ static ALWAYS_INLINE intptr_t endian_fix( intptr_t x )
>  }
>  #endif
>
> -#ifdef __GNUC__
> +#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 3)
>  #define x264_clz(x) __builtin_clz(x)
>  #else
>  static int ALWAYS_INLINE x264_clz( uint32_t x )
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>

Applied.

Dark Shikari


More information about the x264-devel mailing list