tested here:
https://travis-ci.org/muvarov/odp/builds/195670579

On 01/27/17 00:11, Maxim Uvarov wrote:
> Travis CI uses old libconfig8 amd64 1.3.2-2ubuntu2,
> which does not have defines for errors. Move error print
> under ifdef to fix compilation.
> 
> Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>
> ---
>  platform/linux-generic/odp_init.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/platform/linux-generic/odp_init.c 
> b/platform/linux-generic/odp_init.c
> index 2cd8fe3f..685e02fa 100644
> --- a/platform/linux-generic/odp_init.c
> +++ b/platform/linux-generic/odp_init.c
> @@ -130,12 +130,17 @@ static int read_configfile(void)
>       if (config_filename) {
>               ODP_DBG("Reading configuration file: %s\n", config_filename);
>               if (!config_read_file(cf, config_filename)) {
> +#if defined(LIBCONFIG_VER_MAJOR) && LIBCONFIG_VER_MAJOR >= 1 && \
> +                                 LIBCONFIG_VER_MINOR >= 4
>                       ODP_ERR("%s:%d - %s\n",
>                               config_error_file(cf),
>                               config_error_line(cf),
>                               config_error_text(cf));
> +#else
> +                     ODP_ERR("config_read_file\n");
> +#endif
>                       config_destroy(cf);
> -                     return(-1);
> +                     return -1;
>               }
>       }
>  
> 

Reply via email to