<div class="gmail_extra"><div class="gmail_quote">2012/11/29 Martin Sustrik <span dir="ltr"><<a href="mailto:sustrik@250bpm.com" target="_blank">sustrik@250bpm.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi all,<br>
<br>
I am trying to find out whether getifaddrs function is avialable.<br>
<br>
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:<br>
<br>
#include <sys/types.h><br>
#include <ifaddrs.h><br>
<br>
int getifaddrs(struct ifaddrs **ifap);<br>
<br>
When checking whether the symbol exists, I've tried the following:<br>
<br>
set (CMAKE_EXTRA_INCLUDE_FILES sys/types.h)<br>
check_symbol_exists (getifaddrs ifaddrs.h SP_HAVE_IFADDRS)<br>
set (CMAKE_EXTRA_INCLUDE_FILES)<br>
<br>
However, the generated test program still includes only ifaddrs.h and thus fails to detect the symbol.<br>
<br>
How can I force it to include sys/types.h as well?<br>
<br>
Martin<br>
--<br>
<br></blockquote></div><br>Have you tried as per documentation provide list of files? <br clear="all">
<br>check_symbol_exists (getifaddrs "sys/types.h;ifaddrs.h" SP_HAVE_IFADDRS)<br><br>and don't forget this only for C.<br><br><br>-- <br>Best Regards,<br>Sergei Nikulov<br>
</div>