mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-23 02:17:22 +00:00
I'll wrap all compatible code in this CONFIG_COMPAT define. As I'll wrap also compatible parasite generation in this, it's also makefile variable, rather than just C define. The test itself consists of including stubs-32.h, which is glibc6-i686 presence test and is compiled with -m32 option, which is test for gcc-multilib. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
103 lines
1.2 KiB
Makefile
103 lines
1.2 KiB
Makefile
define FEATURE_TEST_TCP_REPAIR
|
|
|
|
#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
|
|
|
|
define FEATURE_TEST_TCP_REPAIR_WINDOW
|
|
|
|
#include <netinet/tcp.h>
|
|
|
|
int main(void)
|
|
{
|
|
struct tcp_repair_window opts;
|
|
|
|
opts.snd_wl1 = 0;
|
|
|
|
return opts.snd_wl1;
|
|
}
|
|
endef
|
|
|
|
define FEATURE_TEST_LIBBSD_DEV
|
|
#include <bsd/string.h>
|
|
|
|
int main(void)
|
|
{
|
|
return 0;
|
|
}
|
|
endef
|
|
|
|
define FEATURE_TEST_STRLCPY
|
|
|
|
#include <string.h>
|
|
|
|
#ifdef CONFIG_HAS_LIBBSD
|
|
# include <bsd/string.h>
|
|
#endif
|
|
|
|
int main(void)
|
|
{
|
|
return strlcpy(NULL, NULL, 0);
|
|
}
|
|
endef
|
|
|
|
define FEATURE_TEST_STRLCAT
|
|
|
|
#include <string.h>
|
|
|
|
#ifdef CONFIG_HAS_LIBBSD
|
|
# include <bsd/string.h>
|
|
#endif
|
|
|
|
int main(void)
|
|
{
|
|
return strlcat(NULL, NULL, 0);
|
|
}
|
|
endef
|
|
|
|
define FEATURE_TEST_PTRACE_PEEKSIGINFO
|
|
|
|
#include <sys/ptrace.h>
|
|
|
|
int main(void)
|
|
{
|
|
struct ptrace_peeksiginfo_args args = {};
|
|
|
|
return 0;
|
|
}
|
|
|
|
endef
|
|
|
|
define FEATURE_TEST_SETPROCTITLE_INIT
|
|
|
|
#include <bsd/unistd.h>
|
|
|
|
int main(int argc, char *argv[], char *envp[])
|
|
{
|
|
setproctitle_init(argc, argv, envp);
|
|
|
|
return 0;
|
|
}
|
|
|
|
endef
|
|
|
|
define FEATURE_TEST_X86_COMPAT
|
|
|
|
/* Test for glibc-devel.i686 presence */
|
|
#include <gnu/stubs-32.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
endef
|