From patchwork Fri Jan 27 14:29:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 92665 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp232742obz; Fri, 27 Jan 2017 06:39:50 -0800 (PST) X-Received: by 10.55.190.199 with SMTP id o190mr8410438qkf.292.1485527990822; Fri, 27 Jan 2017 06:39:50 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q190si3645139qkd.267.2017.01.27.06.39.50; Fri, 27 Jan 2017 06:39:50 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 747EE609D2; Fri, 27 Jan 2017 14:39:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 27BA062E0B; Fri, 27 Jan 2017 14:31:51 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DEDAF60D6C; Fri, 27 Jan 2017 14:31:37 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by lists.linaro.org (Postfix) with ESMTPS id C5E8560D79 for ; Fri, 27 Jan 2017 14:30:01 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id x1so76118833lff.0 for ; Fri, 27 Jan 2017 06:30:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DtVhCVj4Mtno96Q8tM3670ZwZxxSfBZdBtwvMKzhdV4=; b=nTkPXGQiWt3BuLe84SBpCIoKejBzGZSuD4xRmBlabducAOzFUm39nea6gMWKARqxBi ioltTj4CwnjGV5y5v5P5spFYX1AcJ9ZoBIjkJuO7utS7Cp34e+V9o+jqmXsE1Hn5MU0W RTROnDAN/RSXe2EmwRz9eJQAwp7zuSpI1yx31TIPwGHomjOSyJtcVjCxPHGV9DQrN3sA c2Rumt/D9GORnBF/V05JFkN9nyHqhwmVE61aOlhB9D6SRcZHu1CcHIKUQijZcACf6Uw4 OoW42VWzRe0Woya4loZ4iTTxHygJOjpRUcbszEzTrevfEtwZgIpaXbJt2ur9xa1gAHlb m12w== X-Gm-Message-State: AIkVDXLecMmAs3M0UDBPTuU02xoeWfEnUgbpIcZoi96FPqpndMlYjZyXti7WcQw9Zi4s59VexAc= X-Received: by 10.25.92.2 with SMTP id q2mr2803858lfb.121.1485527400365; Fri, 27 Jan 2017 06:30:00 -0800 (PST) Received: from localhost.localdomain (ppp109-252-7-40.pppoe.spdop.ru. [109.252.7.40]) by smtp.gmail.com with ESMTPSA id t9sm1325479lja.48.2017.01.27.06.29.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Jan 2017 06:29:59 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 27 Jan 2017 17:29:21 +0300 Message-Id: <20170127142921.29029-16-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.11.0.295.gd7dffce In-Reply-To: <20170127142921.29029-1-maxim.uvarov@linaro.org> References: <20170127142921.29029-1-maxim.uvarov@linaro.org> Subject: [lng-odp] [API-NEXT PATCH 15/15] linux-gen: support older libconfig version X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" 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 --- platform/linux-generic/odp_init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.11.0.295.gd7dffce Reviewed-by: Christophe Milard 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; } }