rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
885 stars 209 forks source link

Build error #186

Closed perfect7gentleman closed 5 years ago

perfect7gentleman commented 5 years ago

Branch - feature-bind

libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../.. -I../../.. -I/usr//include -I/usr//include -pthread -march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-stack-protector -ftree-vectorize -s -DNDEBUG -Wall -fvisibility=hidden -c socket_address_key.cc  -fPIC -DPIC -o .libs/socket_address_key.o
In file included from address_info.cc:3:
address_info.h:19:14: error: ‘function’ in namespace ‘std’ does not name a template type
 typedef std::function<void (const sockaddr*)> ai_sockaddr_func;
              ^~~~~~~~
address_info.h:19:9: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
address_info.h:9:1:
+#include <functional>

address_info.h:19:9:
 typedef std::function<void (const sockaddr*)> ai_sockaddr_func;
         ^~~
address_info.h:27:52: error: ‘ai_sockaddr_func’ has not been declared
 int ai_each_inet_inet6_first(const char* nodename, ai_sockaddr_func lambda) LIBTORRENT_EXPORT;
                                                    ^~~~~~~~~~~~~~~~
address_info.cc:22:48: error: ‘ai_sockaddr_func’ has not been declared
 ai_each_inet_inet6_first(const char* nodename, ai_sockaddr_func lambda) {
                                                ^~~~~~~~~~~~~~~~
address_info.cc: In function ‘int torrent::ai_each_inet_inet6_first(const char*, int)’:
address_info.cc:35:21: error: ‘lambda’ cannot be used as a function
   lambda(ai->ai_addr);
                     ^
make[4]: *** [Makefile:483: address_info.lo] Error 1
make[4]: Leaving directory '/tmp/portage/net-libs/libtorrent-9999/work/libtorrent-9999/src/torrent/net'
make[3]: *** [Makefile:659: all-recursive] Error 1
make[3]: Leaving directory '/tmp/portage/net-libs/libtorrent-9999/work/libtorrent-9999/src/torrent'
make[2]: *** [Makefile:586: all-recursive] Error 1
make[2]: Leaving directory '/tmp/portage/net-libs/libtorrent-9999/work/libtorrent-9999/src'
make[1]: *** [Makefile:509: all-recursive] Error 1
make[1]: Leaving directory '/tmp/portage/net-libs/libtorrent-9999/work/libtorrent-9999'