From patchwork Tue May 7 01:10:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 43294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 313FEC41513 for ; Tue, 7 May 2024 01:11:01 +0000 (UTC) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web10.1017.1715044257284011088 for ; Mon, 06 May 2024 18:10:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TbcRWNyW; spf=pass (domain: gmail.com, ip: 209.85.210.175, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6f449ea8e37so2274938b3a.3 for ; Mon, 06 May 2024 18:10:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715044256; x=1715649056; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EbVwGNiqsfnGD0IpzdAZJyRvq7rUihWM7k0A68DQukc=; b=TbcRWNyWh6o107doG7+HMu4bB6yL3ULIlZNPrig/mH2FZUgkvE1vofvcI8QE6kUyH5 Sjo0YaXEVeM1Bvs/jDtbmj6xl2nLYJGXdAJVV0C28YGY1jbOPXStiw+/ssE8vsURPCpl 7Ml7u6++hQEaGaUumqTw14eS9eVX3pbuv0kVmUPoVzFnBl+ngS0NJkUwLOFxDXq/zjTn CT3pHVKhT38u5rg5r7TkfJjKrjx6kWrntvCYc1i0RdMFmUu8/m4OpIG/SKGJacqUhQyS gO2B+KQGIG/CVMI87ekKMBLILFbvf1LlKWbSVT2Rd1BRqqU716sM0APW8pM8Yi3e8BPv VrzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715044256; x=1715649056; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EbVwGNiqsfnGD0IpzdAZJyRvq7rUihWM7k0A68DQukc=; b=l7RfwoS+fYg3rD243CP2z7v6K8e1MWLRiPl0OkLQ6WV7bFh37Yb1Bgu7fQunoW3SMm 44GsA653wqHkBcLM5g3zhl+NMfSd+Xq1/IjsXTJso2+XnouEb6ADKwU1aCW//CO2c+FM qz8wSKd+h9rWmbVHRYwgGky6OXg2FDAlZEswjpk+cuiuShKBV5LPdOTpB3nI8KiFxcG1 Ifi0QwhRa16PmToHSH2/4qHFPguxjHQY7w+GzULr9oVpO9PXq6y1eua9RsvYBFsDZUUY ouUFfEGXsJ7tCYa//kclZAAslUTbnnJggpxYK2i2Pe0t62RwPhkSFx2vM03XaNPXVbAc 8wKg== X-Gm-Message-State: AOJu0Yyut8oWQtSxJ8/G4jCQbKzf7ITpBfUIuVFuXhnFICb3JOj2YDET IqLQo3UoG5mZqX2CugePAX2kn1XmJImhExkeylLEmyKh8TOkG/GO13oYXDoe X-Google-Smtp-Source: AGHT+IEOyW7cRVH2UqaS+m10PM+sgU85n0eWU96ugbXXIV4vFmbqRDCyHdbYp9n30ZNOZ9jisVE1mg== X-Received: by 2002:a05:6a21:680d:b0:1af:aef6:7261 with SMTP id wr13-20020a056a21680d00b001afaef67261mr5593304pzb.27.1715044256155; Mon, 06 May 2024 18:10:56 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9d80:4380::cf93]) by smtp.gmail.com with ESMTPSA id sy15-20020a17090b2d0f00b002a5d20778ebsm10693201pjb.32.2024.05.06.18.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 18:10:55 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 1/2] librelp: Fix build with gcc-14 Date: Mon, 6 May 2024 18:10:52 -0700 Message-ID: <20240507011053.309743-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 07 May 2024 01:11:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/110264 Signed-off-by: Khem Raj --- ...gainst-upcoming-gcc-14-Werror-calloc.patch | 37 +++++++++++++++++++ .../rsyslog/librelp_1.11.0.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch b/meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch new file mode 100644 index 0000000000..cf4f4080a6 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/librelp/0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch @@ -0,0 +1,37 @@ +From baf992f82aa987c608731866876adb856847ea45 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 6 May 2024 18:03:40 -0700 +Subject: [PATCH] relp: fix build against upcoming `gcc-14` + (`-Werror=calloc-transposed-args`) + +`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It + detected minor infelicity in `calloc()` API usage + +Fixes +../../git/src/relp.c: In function 'addToEpollSet': +../../git/src/relp.c:101:39: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] + 101 | CHKmalloc(epd = calloc(sizeof(epolld_t), 1)); + | ^~~~~~~~ + +Upstream-Status: Submitted [https://github.com/rsyslog/librelp/pull/264] +Signed-off-by: Khem Raj +--- + src/relp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/relp.c b/src/relp.c +index eadda36..6268f1d 100644 +--- a/src/relp.c ++++ b/src/relp.c +@@ -98,7 +98,7 @@ addToEpollSet(relpEngine_t *const pThis, epolld_type_t typ, void *ptr, int sock, + epolld_t *epd = NULL; + ENTER_RELPFUNC; + +- CHKmalloc(epd = calloc(sizeof(epolld_t), 1)); ++ CHKmalloc(epd = calloc(1, sizeof(epolld_t))); + epd->typ = typ; + epd->ptr = ptr; + epd->sock = sock; +-- +2.45.0 + diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb index 9d949c6303..49847047ac 100644 --- a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb +++ b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb @@ -11,6 +11,7 @@ SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ file://0001-tests-Fix-callback-prototype.patch \ file://0001-tcp-fix-some-compiler-warnings-with-enable-tls-opens.patch \ file://0001-tests-Include-missing-sys-time.h.patch \ + file://0001-relp-fix-build-against-upcoming-gcc-14-Werror-calloc.patch \ file://run-ptest \ " From patchwork Tue May 7 01:10:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 43293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 307E1C25B10 for ; Tue, 7 May 2024 01:11:01 +0000 (UTC) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.web10.1018.1715044258752942004 for ; Mon, 06 May 2024 18:10:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NZ9wYhLc; spf=pass (domain: gmail.com, ip: 209.85.216.54, mailfrom: raj.khem@gmail.com) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2a2da57ab3aso2016489a91.3 for ; Mon, 06 May 2024 18:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715044258; x=1715649058; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sGPgDXcmOcjrxLktvUpzPOCo5dbxZ7qROIV7FSXzPIw=; b=NZ9wYhLcbtS74fr/W4NRo4mwe3EvAd8xMnpFdgrvdRdExGF8YVuW/MmjN7MbblF3hz +xVcPXfqDo7d6hhIXsBBun/1GxdURq+u0H03BQHcM47TL8cFeITllhBZz7BWIWLvTJRY at3ZfzSIoHJaDfiIr5BuKFDi3ewdbZhER/rFcVucY7/KuzRmzQdQB6H3hwXnz47tuMyI PNkjaVZoUKN3ETbpvJoMQ9SfI3nC8PVZxqlTEGJ2RFaTerxwSK5Dasm0KQ+ea27yO8Y1 bK1z71c/I/gx7u2BNNlg06QptxZ8YxfHU6CVjgV7f45+HwHR38VDUIjYT7Ozkc8ZJH0E +gMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715044258; x=1715649058; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sGPgDXcmOcjrxLktvUpzPOCo5dbxZ7qROIV7FSXzPIw=; b=wxo/+b9jZpaQSDOCQ5Pb6LQqNooPemNU6tNmw5//zX7FJqT5qfZUeZ0Z8fcvdO9xlU xjUyhCI0dugRwuO6bUdQuhz9em2fLjygOKguQ5Lsd79ZB/CbXl7etAleeDBzPlfQHclF 68ddhh48UTyWk3ztnvRCgN+u3996udGd0jgQD3oqYMTW8VEUWNCANNFJ6wlWT0vA7J7O 8ywA1TYoqOojNnYHX0Tw9tZrdURZPQ0vAg1qCvilCGM0arjfEty9Of7DeG/qyc+EE8/f gmXMWfQv0k5sbkGEPCNCGucq1CijDcdVwA7OE6VrkYDMOWpwOiZKtGZGKF1oU+WPv2nU /d1A== X-Gm-Message-State: AOJu0YwJgVXXkU3l8evIue76sfH64qtcmMO5Vel91R4h4V7GunL+10hz 2FowXpAlvol2bxRSjTQ7e1mwh5xYuBffbhGjhnjw9qDLrzYBTt3J96Kh9LRU X-Google-Smtp-Source: AGHT+IE6hFKVj+UzupQArA/uXXqwl8wCqI7sE6sQS/ar/b4imlMIKJqBNbp0OSfWAuyyEAsDlHmxtw== X-Received: by 2002:a17:90a:9ab:b0:2b1:a150:f75f with SMTP id 40-20020a17090a09ab00b002b1a150f75fmr10371433pjo.23.1715044257418; Mon, 06 May 2024 18:10:57 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9d80:4380::cf93]) by smtp.gmail.com with ESMTPSA id sy15-20020a17090b2d0f00b002a5d20778ebsm10693201pjb.32.2024.05.06.18.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 18:10:57 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 2/2] pcapplusplus: Fix build with gcc14 Date: Mon, 6 May 2024 18:10:53 -0700 Message-ID: <20240507011053.309743-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240507011053.309743-1-raj.khem@gmail.com> References: <20240507011053.309743-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 07 May 2024 01:11:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/110265 Signed-off-by: Khem Raj --- .../0001-initialize-timespec-variable.patch | 35 +++++++++++++++++++ .../pcapplusplus/pcapplusplus_23.09.bb | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch diff --git a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch new file mode 100644 index 0000000000..f2e210fc67 --- /dev/null +++ b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch @@ -0,0 +1,35 @@ +From 298dec6f87061914c85049faca3d0ff3310d1794 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 6 May 2024 12:15:30 -0700 +Subject: [PATCH] initialize timespec variable + +Fixes build warnings with GCC14 + +/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp: In constructor 'pcpp::RawPacket::RawPacket(const uint8_t*, int, timeval, bool, pcpp::LinkLayerType)': +/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp:23:18: error: 'nsec_time.timespec::' is used uninitialized [-Werror=uninitialized] + 23 | timespec nsec_time; + | ^~~~~~~~~ +cc1plus: all warnings being treated as errors + +Upstream-Status: Submitted [https://github.com/seladb/PcapPlusPlus/pull/1389] +Signed-off-by: Khem Raj +--- + Packet++/src/RawPacket.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Packet++/src/RawPacket.cpp b/Packet++/src/RawPacket.cpp +index 8ad52d52..07dbbbe2 100644 +--- a/Packet++/src/RawPacket.cpp ++++ b/Packet++/src/RawPacket.cpp +@@ -20,7 +20,7 @@ void RawPacket::init(bool deleteRawDataAtDestructor) + + RawPacket::RawPacket(const uint8_t* pRawData, int rawDataLen, timeval timestamp, bool deleteRawDataAtDestructor, LinkLayerType layerType) + { +- timespec nsec_time; ++ timespec nsec_time = {}; + TIMEVAL_TO_TIMESPEC(×tamp, &nsec_time); + init(deleteRawDataAtDestructor); + setRawData(pRawData, rawDataLen, nsec_time, layerType); +-- +2.45.0 + diff --git a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb index 39c6942c83..0ce4885ab7 100644 --- a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb +++ b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb @@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" DEPENDS = "libpcap" -SRC_URI = "git://github.com/seladb/PcapPlusPlus.git;protocol=https;branch=master" +SRC_URI = "git://github.com/seladb/PcapPlusPlus.git;protocol=https;branch=master \ + file://0001-initialize-timespec-variable.patch" + SRCREV = "4cf8ed44f9dd145f874dc1dd747dfefcfcab75be" S = "${WORKDIR}/git"