Hi all,
I am trying to find out whether getifaddrs function is avialable.
To get symbol getifaddrs defined you have to include both sys/types.h
and ifaddrs.h. Here's the synopsis of the function from the man page:
#include <sys/types.h>
#include <ifaddrs.h>
int getifaddrs(struct ifaddrs **ifap);
When checking whether the symbol exists, I've tried the following:
set (CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
check_symbol_exists (getifaddrs ifaddrs.h SP_HAVE_IFADDRS)
set (CMAKE_EXTRA_INCLUDE_FILES)
However, the generated test program still includes only ifaddrs.h and
thus fails to detect the symbol.
How can I force it to include sys/types.h as well?
Martin
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake