]> granicus.if.org Git - libevent/commit
https-client: fix strndup() for mingw build
authorAzat Khuzhin <azat@libevent.org>
Sat, 9 Jul 2022 11:13:57 +0000 (14:13 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sat, 9 Jul 2022 11:39:32 +0000 (14:39 +0300)
commit1bc62ce1718c720fd64e6e2db408bfb07d04b88e
tree6a6a3803d803cf656a6048ccfc7be1d59dbb7dcf
parent29032da661369160f1cfe1019ceecae124d0d8c9
https-client: fix strndup() for mingw build

Right now it still reports [1]:

    2022-07-09T10:53:05.4152800Z ../sample/https-client.c:558:43: warning: implicit declaration of function 'strndup' [-Wimplicit-function-declaration]
    2022-07-09T10:53:05.4153300Z   558 |                         char *host_ipv6 = strndup(&host[1], strlen(&host[1]) - 1);
    2022-07-09T10:53:05.4153651Z       |                                           ^~~~~~~
    2022-07-09T10:53:05.4154095Z ../sample/https-client.c:558:43: warning: incompatible implicit declaration of built-in function 'strndup' [-Wbuiltin-declaration-

  [1]: https://github.com/libevent/libevent/runs/7263194178?check_suite_focus=true
sample/https-client.c