| Message ID | 20220203082620.8186-1-a@unstable.cc |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.31.255.6]) by backend41.mail.ord1d.rsapps.net with LMTP id gJ33K+eR+2FGNgAAqwncew (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Thu, 03 Feb 2022 03:27:19 -0500 Received: from proxy15.mail.iad3b.rsapps.net ([172.31.255.6]) by director8.mail.ord1d.rsapps.net with LMTP id iIU0CeiR+2F1UQAAfY0hYg (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Thu, 03 Feb 2022 03:27:20 -0500 Received: from smtp13.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy15.mail.iad3b.rsapps.net with LMTPS id WAprAOiR+2EdAwAAhyf7VQ (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Thu, 03 Feb 2022 03:27:20 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp13.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 19ecd888-84cb-11ec-be6b-5254001dfc40-1-1 Received: from [216.105.38.7] ([216.105.38.7:60878] helo=lists.sourceforge.net) by smtp13.gate.iad3b.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B5/64-27804-7E19BF16; Thu, 03 Feb 2022 03:27:19 -0500 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1nFXRg-0007yo-9e; Thu, 03 Feb 2022 08:26:23 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <a@unstable.cc>) id 1nFXRe-0007yN-UM for openvpn-devel@lists.sourceforge.net; Thu, 03 Feb 2022 08:26:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2Ho8F6s8+5EX7DNQu6WIf8f0BBobNljDznFFAXMjjDA=; b=HZyFZRmAtBjylFKPyMHmXTd1X5 YmI72f5SGCHXcGK9Vho/rzqP9480I7eBjw7JXALiVLkMKzCwPefMOtIohDuP+mTYUa0D0g8FCaqA4 CkkaWBi/9Gyj28A7JrH7ilS5noEQ7mEMdzqvHw7TxnU3N22MjokaQzWlOH4P4QWpQjbc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=2Ho8F6s8+5EX7DNQu6WIf8f0BBobNljDznFFAXMjjDA=; b=N FKCLkSRtGaU1L4FlC0qGAOle7l1iwlEkqw/wZ+NckSQF6OpDRVoYCYnXln8oxeFo5D96VdwQPYzqv h8DiQ9XML/ppH3n6YFKFCyuJ5oPplovW4a3ruOxlzJIiXhwBFWVvtmXXAaShgKy/UxOGoJW04wPlD oEEYM0nwI6VarNL0=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nFXRb-00EY0a-Jc for openvpn-devel@lists.sourceforge.net; Thu, 03 Feb 2022 08:26:21 +0000 From: Antonio Quartulli <a@unstable.cc> To: openvpn-devel@lists.sourceforge.net Date: Thu, 3 Feb 2022 09:26:20 +0100 Message-Id: <20220203082620.8186-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: strcasecmp() was initially declared in string.h and subsequently moved to strings.h. For historical reasons it still exists in string.h, but would require _DEFAULT_SOURCE to be defined. Due to the above, just include strings.h as currently dictated by the manpage. Content analysis details: (0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1nFXRb-00EY0a-Jc Subject: [Openvpn-devel] [PATCH] keyingmaterialexporter.c: include strings.h X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Cc: Antonio Quartulli <a@unstable.cc> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] keyingmaterialexporter.c: include strings.h
|
|
Commit Message
Antonio Quartulli
Feb. 2, 2022, 9:26 p.m. UTC
strcasecmp() was initially declared in string.h and subsequently moved
to strings.h. For historical reasons it still exists in string.h, but
would require _DEFAULT_SOURCE to be defined.
Due to the above, just include strings.h as currently dictated by the
manpage.
Fixes the following warning:
keying-material-exporter-demo/keyingmaterialexporter.c:155:14: warning: implicit declaration of function strncasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
155 | if (!strncasecmp(objbuf, "CN", 2))
| ^~~~~~~~~~~
| strncmp
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
.../keying-material-exporter-demo/keyingmaterialexporter.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hi, On Thu, Feb 03, 2022 at 09:26:20AM +0100, Antonio Quartulli wrote: > strcasecmp() was initially declared in string.h and subsequently moved > to strings.h. For historical reasons it still exists in string.h, but > would require _DEFAULT_SOURCE to be defined. > > Due to the above, just include strings.h as currently dictated by the > manpage. If we include strings.h, do we still need string.h then? gert
Hi, On 03/02/2022 09:32, Gert Doering wrote: > Hi, > > On Thu, Feb 03, 2022 at 09:26:20AM +0100, Antonio Quartulli wrote: >> strcasecmp() was initially declared in string.h and subsequently moved >> to strings.h. For historical reasons it still exists in string.h, but >> would require _DEFAULT_SOURCE to be defined. >> >> Due to the above, just include strings.h as currently dictated by the >> manpage. > > If we include strings.h, do we still need string.h then? Yes, because the file also uses strlen() and strncmp() (declared in string.h) Regards,
Acked-by: Gert Doering <gert@greenie.muc.de> FreeBSD manpage confirms that <strings.h> should be used. Insanity, but well. Your patch has been applied to the master and release/2.5 branch (bugfix, even if not very critical). commit d93a2b6160759d42d3fbaecc7fc868a7120221ef (master) commit 2d31bf20dcffaab00a677bab06c8fe3816b6605b (release/2.5) Author: Antonio Quartulli Date: Thu Feb 3 09:26:20 2022 +0100 keyingmaterialexporter.c: include strings.h Signed-off-by: Antonio Quartulli <a@unstable.cc> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20220203082620.8186-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23702.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c index 1f47cb35..e2820418 100644 --- a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c +++ b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c @@ -29,6 +29,7 @@ #include <stdio.h> #include <string.h> +#include <strings.h> #include <stdlib.h> #include "openvpn-plugin.h"