Commit 0ad373ba authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

make: config add test for ptrace_peeksiginfo_args

Currently we check PTRACE_PEEKSIGINFO and if it's defined in a system
header, we suppose that ptrace_peeksiginfo_args is defined there too.

But due to a bug in glibc, this check doesn't work. Now we have F20,
where ptrace_peeksiginfo_args is defined in sys/ptrace and F21 where
it isn't defined.

commit 9341dde4d56ca71b61b47c8b87a06e6d5813ed0e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Jan 5 16:07:13 2014 -0500

    ptrace.h: add __ prefix to ptrace_peeksiginfo_args
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 446fdd72
...@@ -18,6 +18,9 @@ ifeq ($(call try-cc,$(STRLCPY_TEST),,),y) ...@@ -18,6 +18,9 @@ ifeq ($(call try-cc,$(STRLCPY_TEST),,),y)
endif endif
ifeq ($(call try-cc,$(STRLCAT_TEST),,),y) ifeq ($(call try-cc,$(STRLCAT_TEST),,),y)
$(Q) @echo '#define CONFIG_HAS_STRLCAT' >> $@ $(Q) @echo '#define CONFIG_HAS_STRLCAT' >> $@
endif
ifeq ($(call try-cc,$(PTRACE_PEEKSIGINFO_TEST),,),y)
$(Q) @echo '#define CONFIG_HAS_PEEKSIGINFO_ARGS' >> $@
endif endif
$(Q) @echo '#endif /* __CR_CONFIG_H__ */' >> $@ $(Q) @echo '#endif /* __CR_CONFIG_H__ */' >> $@
......
...@@ -19,14 +19,17 @@ ...@@ -19,14 +19,17 @@
#ifndef PTRACE_PEEKSIGINFO #ifndef PTRACE_PEEKSIGINFO
#define PTRACE_PEEKSIGINFO 0x4209 #define PTRACE_PEEKSIGINFO 0x4209
/* Read signals from a shared (process wide) queue */
#define PTRACE_PEEKSIGINFO_SHARED (1 << 0)
#endif
#ifndef CONFIG_HAS_PEEKSIGINFO_ARGS
struct ptrace_peeksiginfo_args { struct ptrace_peeksiginfo_args {
__u64 off; /* from which siginfo to start */ __u64 off; /* from which siginfo to start */
__u32 flags; __u32 flags;
__u32 nr; /* how may siginfos to take */ __u32 nr; /* how may siginfos to take */
}; };
/* Read signals from a shared (process wide) queue */
#define PTRACE_PEEKSIGINFO_SHARED (1 << 0)
#endif #endif
#ifndef PTRACE_GETREGSET #ifndef PTRACE_GETREGSET
......
...@@ -55,3 +55,16 @@ int main(void) ...@@ -55,3 +55,16 @@ int main(void)
return strlcat(dst, src, sizeof(dst)); return strlcat(dst, src, sizeof(dst));
} }
endef endef
define PTRACE_PEEKSIGINFO_TEST
#include <sys/ptrace.h>
int main(void)
{
struct ptrace_peeksiginfo_args args = {};
return 0;
}
endef
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment