Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 580598 Details for
Bug 549108
sys-apps/sandbox: build with musl libc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-libsandbox-trace.c-tweak-ptrace-command-type-for-mus.patch
0001-libsandbox-trace.c-tweak-ptrace-command-type-for-mus.patch (text/plain), 1.96 KB, created by
Sergei Trofimovich (RETIRED)
on 2019-06-23 20:53:18 UTC
(
hide
)
Description:
0001-libsandbox-trace.c-tweak-ptrace-command-type-for-mus.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2019-06-23 20:53:18 UTC
Size:
1.96 KB
patch
obsolete
>From 74143893ce2ac238b5d3fd473c24720d6ad798f3 Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Sun, 23 Jun 2019 21:48:26 +0100 >Subject: [PATCH 1/2] libsandbox/trace.c: tweak ptrace command type for musl > >glibc defines ptrace as: > long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data); >musl defines ptrace as: > long ptrace(int, ...); > >This causes build failure in for of: > ../../sandbox-2.17/libsandbox/trace/linux/x86_64.c: In function 'trace_set_ret': > ../../sandbox-2.17/libsandbox/trace/linux/x86_64.c:99:2: error: type of formal parameter 1 is incomplete > trace_set_regs(regs); > ^~~~~~~~~~~~~~ > >Let's clobber to 'int' lowest common denominator. > >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > libsandbox/trace.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/libsandbox/trace.c b/libsandbox/trace.c >index fb1fc32..3efef23 100644 >--- a/libsandbox/trace.c >+++ b/libsandbox/trace.c >@@ -10,7 +10,16 @@ > #include "sb_nr.h" > > static long do_peekdata(long offset); >-static long _do_ptrace(enum __ptrace_request request, const char *srequest, void *addr, void *data); >+/* Note on _do_ptrace argument types: >+ glibc defines ptrace as: >+ long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data); >+ musl defines ptrace as: >+ long ptrace(int, ...); >+ >+ Let's clobber to 'int' lowest common denominator. >+ */ >+typedef int sb_ptrace_req_t; >+static long _do_ptrace(sb_ptrace_req_t request, const char *srequest, void *addr, void *data); > #define do_ptrace(request, addr, data) _do_ptrace(request, #request, addr, data) > #define _trace_possible(data) true > >@@ -44,7 +53,7 @@ static void trace_exit(int status) > _exit(status); > } > >-static long _do_ptrace(enum __ptrace_request request, const char *srequest, void *addr, void *data) >+static long _do_ptrace(sb_ptrace_req_t request, const char *srequest, void *addr, void *data) > { > long ret; > try_again: >-- >2.22.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 549108
:
403010
|
403012
|
403814
|
404754
|
496772
|
496774
|
496776
|
496778
| 580598 |
580600
|
580730
|
581128