| 1 |
#!/usr/bin/env python |
| 2 |
|
| 3 |
def configure(conf): |
| 4 |
conf.CHECK_CODE(''' |
| 5 |
#include <netinet/tcp.h> |
| 6 |
int main(void) { return TCP_USER_TIMEOUT; } |
| 7 |
''', |
| 8 |
'HAVE_TCP_USER_TIMEOUT', |
| 9 |
addmain=False, |
| 10 |
msg='Checking for TCP_USER_TIMEOUT') |
| 11 |
|
| 12 |
def build(bld): |
| 13 |
bld.SAMBA_SUBSYSTEM( |
| 14 |
'LIBTSOCKET', |
| 15 |
source='tsocket.c tsocket_helpers.c tsocket_bsd.c', |
| 16 |
public_deps='talloc tevent iov_buf socket-blocking LIBASYNC_REQ', |
| 17 |
public_headers='tsocket.h tsocket_internal.h' |
| 18 |
) |
| 19 |
|
| 20 |
bld.SAMBA_BINARY( |
| 21 |
'test_tsocket_bsd_addr', |
| 22 |
source='tests/test_bsd_addr.c', |
| 23 |
deps='cmocka replace LIBTSOCKET', |
| 24 |
local_include=False, |
| 25 |
for_selftest=True |
| 26 |
) |
| 27 |
|
| 28 |
bld.SAMBA_BINARY( |
| 29 |
'test_tstream', |
| 30 |
source='tests/test_tstream.c tests/socketpair_tcp.c', |
| 31 |
deps='cmocka replace LIBTSOCKET', |
| 32 |
local_include=False, |
| 33 |
enabled=bld.CONFIG_SET('HAVE_TCP_USER_TIMEOUT'), |
| 34 |
for_selftest=True |
| 35 |
) |
| 36 |
|