Compiling ffmpeg results in an error in stdlib.h

I cross-compile the ffmpeg source to the mips-openwrt target using the toolchain I created for this platform (MIPS openwrt).

Then ffmpeg make produces below errors in the uclibc stdlib.h header file, as shown below:

In file included from ./libavutil/avassert.h:30:0,
                 from libavfilter/avfilter.c:23:
/home/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.3/../../../../mips-openwrt-linux-uclibc/sys-include/stdlib.h:546:14: error: expected identifier or '(' before 'void'
/home/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.3/../../../../mips-openwrt-linux-uclibc/sys-include/stdlib.h:546:14: error: expected ')' before numeric constant

Code from uclibc stdlib.h around this line number

    #ifdef __USE_ISOC99
    __BEGIN_NAMESPACE_C99
    /* Terminate the program with STATUS without calling any of the
       functions registered with `atexit' or `on_exit'.  */
    extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__));
    __END_NAMESPACE_C99
    #endif

   __BEGIN_NAMESPACE_STD
   /* Return the value of envariable NAME, or NULL if it doesn't exist.  */
   extern char *getenv (__const char *__name) __THROW __nonnull ((1)) __wur; << This is the line where the compilation error is
   __END_NAMESPACE_STD

Any pointers to reconfiguration would be helpful.

+4
source share

Source: https://habr.com/ru/post/1610256/


All Articles