2013-05-20 16:02:14 +04:00
|
|
|
define TCP_REPAIR_TEST
|
|
|
|
|
|
|
|
#include <netinet/tcp.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
struct tcp_repair_opt opts;
|
|
|
|
opts.opt_code = TCP_NO_QUEUE;
|
|
|
|
opts.opt_val = 0;
|
|
|
|
|
|
|
|
return opts.opt_val;
|
|
|
|
}
|
|
|
|
endef
|
2013-05-23 13:34:50 +04:00
|
|
|
|
|
|
|
define PRLIMIT_TEST
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/resource.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
struct rlimit limit = {
|
|
|
|
.rlim_cur = RLIM_INFINITY,
|
|
|
|
.rlim_max = RLIM_INFINITY,
|
|
|
|
};
|
|
|
|
|
|
|
|
return prlimit(getpid(), RLIMIT_CPU, &limit, NULL);
|
|
|
|
}
|
|
|
|
endef
|
2013-08-28 19:06:43 +04:00
|
|
|
|
2014-03-25 01:30:11 +04:00
|
|
|
define LIBBSD_DEV_TEST
|
|
|
|
#include <bsd/string.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
endef
|
|
|
|
|
2013-08-28 19:06:43 +04:00
|
|
|
define STRLCPY_TEST
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2014-03-25 01:30:11 +04:00
|
|
|
#ifdef CONFIG_HAS_LIBBSD
|
|
|
|
# include <bsd/string.h>
|
|
|
|
#endif
|
|
|
|
|
2013-08-28 19:06:43 +04:00
|
|
|
int main(void)
|
|
|
|
{
|
2014-03-21 12:04:34 +04:00
|
|
|
return strlcpy(NULL, NULL, 0);
|
2013-08-28 19:06:43 +04:00
|
|
|
}
|
|
|
|
endef
|
2013-11-29 13:34:28 +04:00
|
|
|
|
|
|
|
define STRLCAT_TEST
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2014-03-25 01:30:11 +04:00
|
|
|
#ifdef CONFIG_HAS_LIBBSD
|
|
|
|
# include <bsd/string.h>
|
|
|
|
#endif
|
|
|
|
|
2013-11-29 13:34:28 +04:00
|
|
|
int main(void)
|
|
|
|
{
|
2014-03-21 12:04:34 +04:00
|
|
|
return strlcat(NULL, NULL, 0);
|
2013-11-29 13:34:28 +04:00
|
|
|
}
|
|
|
|
endef
|
2014-02-03 18:40:00 +04:00
|
|
|
|
|
|
|
define PTRACE_PEEKSIGINFO_TEST
|
|
|
|
|
|
|
|
#include <sys/ptrace.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
struct ptrace_peeksiginfo_args args = {};
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
endef
|
2014-08-06 21:56:23 +02:00
|
|
|
|
|
|
|
define SETPROCTITLE_INIT_TEST
|
|
|
|
|
|
|
|
#include <bsd/unistd.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[], char *envp[])
|
|
|
|
{
|
|
|
|
setproctitle_init(argc, argv, envp);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
endef
|
2016-02-08 18:32:32 +03:00
|
|
|
|
|
|
|
define MEMFD_TEST
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/syscall.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2016-02-15 23:17:00 +03:00
|
|
|
#ifdef SYS_memfd_create
|
2016-02-08 18:32:32 +03:00
|
|
|
return 0;
|
2016-02-09 00:01:00 +03:00
|
|
|
#else
|
|
|
|
#error No memfd support
|
2016-02-08 18:32:32 +03:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
endef
|