]> git.ipfire.org Git - thirdparty/openvpn.git/commit
keyingmaterialexporter.c: include strings.h
authorAntonio Quartulli <a@unstable.cc>
Thu, 3 Feb 2022 08:26:20 +0000 (09:26 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 3 Feb 2022 10:37:39 +0000 (11:37 +0100)
commit2d31bf20dcffaab00a677bab06c8fe3816b6605b
treecba92aebfc361e6a31428ea5ea5b7436d7e23705
parent167f90e2f574d5fbda4b3e3945cc6baf0288847b
keyingmaterialexporter.c: include strings.h

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>
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>
(cherry picked from commit d93a2b6160759d42d3fbaecc7fc868a7120221ef)
sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c