From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Nick Hainke <vincent@systemli.org>
Subject: [PATCH] libtracefs: fix compiling with musl
Date: Mon, 11 Jul 2022 14:14:59 -0400 [thread overview]
Message-ID: <20220711141459.2972e95b@gandalf.local.home> (raw)
From: Nick Hainke <vincent@systemli.org>
The library does not build with musl due to a missing pthread.h include.
This commit adds the missing include.
Fixes errors in the form of:
In file included from tracefs-utils.c:21:
...cortex-a53_musl/libtracefs-1.4.1/include/tracefs-local.h:30:9:
error: unknown type name 'pthread_mutex_t'
30 | pthread_mutex_t lock;
| ^~~~~~~~~~~~~~~
.../cortex-a53_musl/libtracefs-1.4.1/include/tracefs-local.h:41:8:
error: unknown type name 'pthread_mutex_t'
41 | extern pthread_mutex_t toplevel_lock;
| ^~~~~~~~~~~~~~~
...cortex-a53_musl/libtracefs-1.4.1/include/tracefs-local.h:43:15:
error: unknown type name 'pthread_mutex_t'
43 | static inline pthread_mutex_t *trace_get_lock(struct ...
| ^~~~~~~~~~~~~~~
Signed-off-by: Nick Hainke <vincent@systemli.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Taken from a github pull request.
https://github.com/rostedt/libtracefs/commit/01bb4cd9d4e408bf2ec45623760ec5b90a3253c0
include/tracefs-local.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/tracefs-local.h b/include/tracefs-local.h
index 1652a27..2267007 100644
--- a/include/tracefs-local.h
+++ b/include/tracefs-local.h
@@ -6,6 +6,8 @@
#ifndef _TRACE_FS_LOCAL_H
#define _TRACE_FS_LOCAL_H
+#include <pthread.h>
+
#define __hidden __attribute__((visibility ("hidden")))
#define __internal __attribute__((visibility ("internal")))
#define __weak __attribute__((weak))
reply other threads:[~2022-07-11 18:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220711141459.2972e95b@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=vincent@systemli.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).