This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] [5/6] fix libjava build failure with glibc-2.26
- From: Matthias Klose <doko at ubuntu dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: Thu, 7 Sep 2017 09:01:30 +0200
- Subject: [patch] [5/6] fix libjava build failure with glibc-2.26
- Authentication-results: sourceware.org; auth=none
Fix libjava build failure with glibc-2.26, replacing 'struct ucontext' with
ucontext_t. Ok for the gcc-5 and gcc-6 branches? Doesn't apply to 7 and trunk,
because libjava is removed.
Matthias
* include/x86_64-signal.h (HANDLE_DIVIDE_OVERFLOW): Replace
'struct ucontext' with ucontext_t.
* include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise.
* include/s390-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise.
# DP: Fix libjava build failure with glibc-2.26
--- a/src/libjava/include/x86_64-signal.h
+++ a/src/libjava/include/x86_64-signal.h
@@ -28,7 +28,7 @@
#define HANDLE_DIVIDE_OVERFLOW \
do \
{ \
- struct ucontext *_uc = (struct ucontext *)_p; \
+ ucontext_t *_uc = (ucontext_t *)_p; \
gregset_t &_gregs = _uc->uc_mcontext.gregs; \
unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \
\
--- a/src/libjava/include/i386-signal.h
+++ a/src/libjava/include/i386-signal.h
@@ -29,7 +29,7 @@
#define HANDLE_DIVIDE_OVERFLOW \
do \
{ \
- struct ucontext *_uc = (struct ucontext *)_p; \
+ ucontext_t *_uc = (ucontext_t *)_p; \
gregset_t &_gregs = _uc->uc_mcontext.gregs; \
unsigned char *_eip = (unsigned char *)_gregs[REG_EIP]; \
\
--- a/src/libjava/include/s390-signal.h
+++ a/src/libjava/include/s390-signal.h
@@ -51,7 +51,7 @@
struct \
{ \
unsigned long int uc_flags; \
- struct ucontext *uc_link; \
+ ucontext_t *uc_link; \
stack_t uc_stack; \
mcontext_t uc_mcontext; \
unsigned long sigmask[2]; \