xmm1989218 / netmap

Automatically exported from code.google.com/p/netmap
0 stars 0 forks source link

Conflict with Boost Threads, patch provided #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, folks!

You use macro define which conflicts with Boost Threads library because you use 
D() name which already used in Boost Threads.

I got follow error:
g++ netmap.cpp -I/usr/src/fastnetmon/tests/netmap_includes -lthread
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:32:0,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/thread/pthread/thread_data.hpp:10,
                 from /usr/include/boost/thread/thread.hpp:17,
                 from /usr/include/boost/thread.hpp:13,
                 from netmap.cpp:8:
/usr/include/boost/smart_ptr/detail/shared_count.hpp: In constructor 
‘boost::detail::shared_count::shared_count(P, 
boost::detail::sp_inplace_tag<D>)’:
/usr/include/boost/smart_ptr/detail/shared_count.hpp:164:16: error: expected 
‘;’ before ‘(’ token
/usr/include/boost/smart_ptr/detail/shared_count.hpp: In constructor 
‘boost::detail::shared_count::shared_count(P, 
boost::detail::sp_inplace_tag<D>, A)’:
/usr/include/boost/smart_ptr/detail/shared_count.hpp:250:16: error: expected 
‘;’ before ‘(’ token

I prepared patch for fixing this issue. Please apply it: 
https://raw.githubusercontent.com/FastVPSEestiOu/fastnetmon/master/patches/0001-
Fix-netmap-code-for-compatibility-with-C-boost.patch

Original issue reported on code.google.com by pavel.odintsov on 2 Mar 2015 at 12:56