On Dec 6, 2014, at 11:44 PM, Loganaden Velvindron <lo...@elandsys.com> wrote:

> On Sat, Dec 06, 2014 at 11:41:51PM -0800, Guy Harris wrote:
>> 
>> On Dec 6, 2014, at 9:19 PM, Loganaden Velvindron <lo...@elandsys.com> wrote:
>> 
>>> Here's the config.log output:
>>> 
>>> configure:4540: checking for cap_rights_init
>>> configure:4540: cc -o conftest -g -O2   conftest.c  >&5
>>> /tmp/conftest-942ee0.o: In function `main':
>>> /root/tcpdump/tcpdump-4.6.2/conftest.c:66: undefined reference to 
>>> `cap_rights_init'
>>> cc: error: linker command failed with exit code 1 (use -v to see invocation)
>> 
>> So, in FreeBSD 10.1, is cap_rights_init() a function in libc, or is it a 
>> macro that calls a function with a different name? The linker seems to be 
>> indicating that it's not present in the standard library.
> 
> According to the man page, it's part of the standard libc:

And the answer is B) it's a macro that calls a function with a different name; 
from <sys/capsicum.h> in FreeBSD SVN:

        #define cap_rights_init(...)                                            
\
                __cap_rights_init(CAP_RIGHTS_VERSION, __VA_ARGS__, 0ULL)
        cap_rights_t *__cap_rights_init(int version, cap_rights_t *rights, ...);

The same is true of cap_rights_set, cap_rights_clear, and cap_rights_is_set, so 
we can't check *any* of them with AC_CHECK_FUNCS.

The only one we're checking for is cap_rights_init, though, so removing that 
from the list (with a comment explaining why we can't check for it) would 
suffice.
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Reply via email to