Date: Sun, 9 Sep 2018 07:15:23 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r479275 - head/www/tinytinyhttpd/files Message-ID: <201809090715.w897FNbq013767@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Sun Sep 9 07:15:22 2018 New Revision: 479275 URL: https://svnweb.freebsd.org/changeset/ports/479275 Log: www/tinytinyhttpd: Unbreak with Clang 6 c++ -DHAVE_CONFIG_H -I. -O2 -pipe -fstack-protector -fno-strict-aliasing -D_THREAD_SAFE -pthread -D_REENTRANT -MT httpd.o -MD -MP -MF .deps/httpd.Tpo -c -o httpd.o httpd.cxx httpd.cxx:1019:21: error: assigning to 'int' from incompatible type 'nullptr_t' res_info->write = NULL; ^~~~ httpd.cxx:1734:8: error: no matching function for call to 'sendfile' if (sendfile(msgsock, res_info->read, NULL, total, NULL, NULL, 0) == 0) sent = total; ^~~~~~~~ http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475044_s336572/logs/tinytinyhttpd-0.0.11.log PR: 230890 Submitted by: tobik Approved by: smatsui@karashi.org (maintainer timeout, 2 weeks) Added: head/www/tinytinyhttpd/files/patch-httpd.cxx (contents, props changed) Added: head/www/tinytinyhttpd/files/patch-httpd.cxx ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/tinytinyhttpd/files/patch-httpd.cxx Sun Sep 9 07:15:22 2018 (r479275) @@ -0,0 +1,33 @@ +httpd.cxx:1019:21: error: assigning to 'int' from incompatible type 'nullptr_t' + res_info->write = NULL; + ^~~~ +/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL' +#define NULL nullptr + ^~~~~~~ +httpd.cxx:1734:8: error: no matching function for call to 'sendfile' + if (sendfile(msgsock, res_info->read, NULL, total, NULL, NULL, 0) == 0) sent = total; + ^~~~~~~~ +/usr/include/sys/socket.h:684:5: note: candidate function not viable: no known conversion from 'nullptr_t' to 'off_t' (aka 'long long') for 3rd argument +int sendfile(int, int, off_t, size_t, struct sf_hdtr *, off_t *, int); + ^ + +--- httpd.cxx.orig 2018-08-25 14:11:36 UTC ++++ httpd.cxx +@@ -1016,7 +1016,7 @@ static RES_INFO* res_popen(std::vector<std::string>& a + static void res_closewriter(RES_INFO* res_info) { + if (res_info && res_info->write) { + close(res_info->write); +- res_info->write = NULL; ++ res_info->write = 0; + } + } + +@@ -1731,7 +1731,7 @@ request_done: + #if defined LINUX_SENDFILE_API + sent = sendfile(msgsock, res_info->read, NULL, total); + #elif defined FREEBSD_SENDFILE_API +- if (sendfile(msgsock, res_info->read, NULL, total, NULL, NULL, 0) == 0) sent = total; ++ if (sendfile(msgsock, res_info->read, 0, total, NULL, NULL, 0) == 0) sent = total; + #elif defined _WIN32 + if (!res_info->process && lpfnTransmitFile && lpfnTransmitFile( + msgsock,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809090715.w897FNbq013767>