我寫了一個程序女巫使用pfring和ASIO,Boost.Asio的和pfring衝突
我的程序,如:
#include <boost/asio.hpp>
#include <pfring.h>
int main(void) {
// ...
return 0;
}
我得到錯誤:
In file included from /usr/local/include/pfring.h:46:0,
from test.cpp:2:
/usr/include/linux/if.h:136:8: error: redefinition of 'struct ifmap'
/usr/include/net/if.h:112:8: error: previous definition of 'struct ifmap'
/usr/include/linux/if.h:170:8: error: redefinition of 'struct ifreq'
/usr/include/net/if.h:127:8: error: previous definition of 'struct ifreq'
/usr/include/linux/if.h:219:8: error: redefinition of 'struct ifconf'
/usr/include/net/if.h:177:8: error: previous definition of 'struct ifconf'
我怎樣才能解決這個問題?