From patchwork Tue Jan 1 09:59:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 1019754 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oP6M59Zl"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43TTwb2prBz9s3l for ; Tue, 1 Jan 2019 20:51:41 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 53C1F8633B; Tue, 1 Jan 2019 09:51:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LDxHKh61bmw6; Tue, 1 Jan 2019 09:51:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 66761861B0; Tue, 1 Jan 2019 09:51:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id CE16D1C0C57 for ; Tue, 1 Jan 2019 09:51:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CB16985258 for ; Tue, 1 Jan 2019 09:51:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5xLs5uGGSbvx for ; Tue, 1 Jan 2019 09:51:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8C01D851CC for ; Tue, 1 Jan 2019 09:51:32 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id z13so19304898lfe.11 for ; Tue, 01 Jan 2019 01:51:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=L3x/SzC9Ms5eTIlVCKa+Icz+VF2YLSBmAbx2qBfE9e8=; b=oP6M59ZlVSfFgdVV7BoBzZzQ6/fmY7miesnmyowMCAsV1Dm+ICqLSdAVOaoBediksK xXAjNZPb9VbfoXei5B3DqnXmm8xm16aAvblA3tX6LzbYVtFSX1loceKAigFIfgW9983M 9TVejc2i56zVnvFGBFK5AmyKzcZXjh/eQoeR6qsp/tCKRP1W73Hw0CAO5fHW+aP9xGm1 ShhpB5GIDt0Ai/meVjaMCFJ7HUmGwdDH61uarZKYV9RlFaC+tXkKNpBmeLtKqOQbJiQ/ AnznqgkCZdKgH2kaxL5hnfRC/6wFesbjOgGEXejTpqFf5ENjri82/Sgs2zzRhca96MPE er3Q== 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; bh=L3x/SzC9Ms5eTIlVCKa+Icz+VF2YLSBmAbx2qBfE9e8=; b=fLCrV3UePmOWEUlYzcnAlkr5Bu/SLHF0TaMsLrj21l9SDOKkCfFdC8N/cjKzC1c/fa kSfrkmTsNxxok/beYiVgXYv7rPLSIhYlnW8WEx01MJw3rSEXDiA+kJ88mdijRSAXsZ5D Xyato559wrTOAEFpWBgGevfXO93de8g9ZbrsSDh9NWGbuz76GxKdI6ebu/68NkVL5Aoq 4FGqPNAWQ/2QgslgqGkTh3JO3mdbXnAMp9RaHwh1s/db0Ay/AdjSDDFOcYsVagLlXK8w XinQN6ECGErS1yRPo52ov8mWJ0hCCMHgjaj5qGbn+h9PhTMWtJiBuonEal467ebPWul6 sPLw== X-Gm-Message-State: AA+aEWbbSeD9iSjF5Es4ivaAMoj9qnnGS1FyN09sg1JZjXHci+I3/YRw RYQC/zE2lFyKvuNIjxmXkB3ShNDa X-Google-Smtp-Source: AFSGD/Vk+goZnNm9NzBCgoW0eih3UQtRTa/w93ZvpixYPn4nWfJim1sTRDAe53CP3Xy32VfgpPUV9w== X-Received: by 2002:a19:6806:: with SMTP id d6mr19143200lfc.48.1546336290205; Tue, 01 Jan 2019 01:51:30 -0800 (PST) Received: from vkochan-ThinkPad-T470p.lan ([213.109.80.185]) by smtp.gmail.com with ESMTPSA id c203sm9624311lfe.95.2019.01.01.01.51.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jan 2019 01:51:29 -0800 (PST) From: Vadim Kochan To: buildroot@buildroot.org Date: Tue, 1 Jan 2019 11:59:54 +0200 Message-Id: <20190101095954.8313-1-vadim4j@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [Buildroot] [PATCH 1/1] package/collectd: Fix build issue with SENSORS_API_VERSION >= 0x500 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Current collectd version 5.7.1 fails to compile because there is check which breaks the compilation if lm_sensors API >= 0x500, but in the mainline codebase this check was removed in commit: https://github.com/collectd/collectd/commit/069796bd76dd1ab0089a64f7c9c2a3c9f1475414 So add backported patch based on this commit. Fixes: http://autobuild.buildroot.net/results/c3c84ca6e11b268ba5ada7e3dca18bca681ee43d/ Signed-off-by: Vadim Kochan --- ...oved-checks-for-upper-limit-of-SENSORS_AP.patch | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 package/collectd/0003-sensors-Removed-checks-for-upper-limit-of-SENSORS_AP.patch diff --git a/package/collectd/0003-sensors-Removed-checks-for-upper-limit-of-SENSORS_AP.patch b/package/collectd/0003-sensors-Removed-checks-for-upper-limit-of-SENSORS_AP.patch new file mode 100644 index 0000000000..9270021dd6 --- /dev/null +++ b/package/collectd/0003-sensors-Removed-checks-for-upper-limit-of-SENSORS_AP.patch @@ -0,0 +1,89 @@ +From 069796bd76dd1ab0089a64f7c9c2a3c9f1475414 Mon Sep 17 00:00:00 2001 +From: Pavel Rochnyack +Date: Mon, 3 Dec 2018 18:34:14 +0700 +Subject: [PATCH] sensors: Removed checks for upper limit of + SENSORS_API_VERSION + +That makes no more sense after lm-sensors got new maintainers. + +Issue: #3006 + +[Vadim Kochan: backported to support 5.7.1 version] +Signed-off-by: Vadim Kochan +--- + src/sensors.c | 17 ++++++----------- + 1 file changed, 6 insertions(+), 11 deletions(-) + +diff --git a/src/sensors.c b/src/sensors.c +index 8f1824d..409dc38 100644 +--- a/src/sensors.c ++++ b/src/sensors.c +@@ -149,7 +149,7 @@ typedef struct featurelist { + static char *conffile = SENSORS_CONF_PATH; + /* #endif SENSORS_API_VERSION < 0x400 */ + +-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) ++#elif (SENSORS_API_VERSION >= 0x400) + typedef struct featurelist { + const sensors_chip_name *chip; + const sensors_feature *feature; +@@ -159,11 +159,6 @@ typedef struct featurelist { + + static char *conffile = NULL; + static _Bool use_labels = 0; +-/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ +- +-#else /* if SENSORS_API_VERSION >= 0x500 */ +-#error "This version of libsensors is not supported yet. Please report this " \ +- "as bug." + #endif + + static featurelist_t *first_feature = NULL; +@@ -223,7 +218,7 @@ static int sensors_config(const char *key, const char *value) { + if (IS_TRUE(value)) + ignorelist_set_invert(sensor_list, 0); + } +-#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) ++#if (SENSORS_API_VERSION >= 0x400) + else if (strcasecmp(key, "UseLabels") == 0) { + use_labels = IS_TRUE(value) ? 1 : 0; + } +@@ -353,7 +348,7 @@ static int sensors_load_conf(void) { + } /* while sensors_get_detected_chips */ + /* #endif SENSORS_API_VERSION < 0x400 */ + +-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) ++#elif (SENSORS_API_VERSION >= 0x400) + chip_num = 0; + while ((chip = sensors_get_detected_chips(NULL, &chip_num)) != NULL) { + const sensors_feature *feature; +@@ -404,7 +399,7 @@ static int sensors_load_conf(void) { + } /* while (subfeature) */ + } /* while (feature) */ + } /* while (chip) */ +-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ ++#endif /* (SENSORS_API_VERSION >= 0x400) */ + + if (first_feature == NULL) { + sensors_cleanup(); +@@ -479,7 +474,7 @@ static int sensors_read(void) { + } /* for fl = first_feature .. NULL */ + /* #endif SENSORS_API_VERSION < 0x400 */ + +-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) ++#elif (SENSORS_API_VERSION >= 0x400) + for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next) { + double value; + int status; +@@ -518,7 +513,7 @@ static int sensors_read(void) { + + sensors_submit(plugin_instance, type, type_instance, value); + } /* for fl = first_feature .. NULL */ +-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ ++#endif /* (SENSORS_API_VERSION >= 0x400) */ + + return (0); + } /* int sensors_read */ +-- +2.14.1 +