All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libtracefs: make it build against musl C library
@ 2020-12-02  4:08 Tzvetomir Stoyanov (VMware)
  2020-12-02 14:36 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2020-12-02  4:08 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel, beniaminsandu

From: Beniamin Sandu <beniaminsandu@gmail.com>

* add some missing headers and macros
* set pthread affinity using pthread_setaffinity_np after creating the thread
instead of pthread_attr_setaffinity_np (which seems to not be implemented
in musl)

Tested using https://musl.cc/x86_64-linux-musl-native.tgz

Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com

Reviewed-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
[ Fixed a whitespace issue ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 include/tracefs-local.h | 12 ++++++++++++
 tracefs-events.c        |  1 +
 2 files changed, 13 insertions(+)

diff --git a/include/tracefs-local.h b/include/tracefs-local.h
index 9cc371b..bdbf89e 100644
--- a/include/tracefs-local.h
+++ b/include/tracefs-local.h
@@ -13,4 +13,16 @@ void warning(const char *fmt, ...);
 int str_read_file(const char *file, char **buffer);
 char *trace_append_file(const char *dir, const char *name);
 
+#ifndef ACCESSPERMS
+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
+#endif
+
+#ifndef ALLPERMS
+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
+#endif
+
+#ifndef DEFFILEMODE
+#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666*/
+#endif
+
 #endif /* _TRACE_FS_LOCAL_H */
diff --git a/tracefs-events.c b/tracefs-events.c
index ca1d22b..ee45988 100644
--- a/tracefs-events.c
+++ b/tracefs-events.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <limits.h>
 
 #include <traceevent/kbuffer.h>
 
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] libtracefs: make it build against musl C library
  2020-12-02  4:08 [PATCH] libtracefs: make it build against musl C library Tzvetomir Stoyanov (VMware)
@ 2020-12-02 14:36 ` Steven Rostedt
  2020-12-02 18:43   ` Beniamin Sandu
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2020-12-02 14:36 UTC (permalink / raw)
  To: Tzvetomir Stoyanov (VMware); +Cc: linux-trace-devel, beniaminsandu

On Wed,  2 Dec 2020 06:08:02 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:

> From: Beniamin Sandu <beniaminsandu@gmail.com>
> 
> * add some missing headers and macros
> * set pthread affinity using pthread_setaffinity_np after creating the thread
> instead of pthread_attr_setaffinity_np (which seems to not be implemented
> in musl)
> 
> Tested using https://musl.cc/x86_64-linux-musl-native.tgz
> 
> Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com
> 
> Reviewed-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
> [ Fixed a whitespace issue ]
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Tzvetomir,

FYI, when sending patches, even for those you are not the author for,
you are still required to add a Signed-off-by.

Please add that here, and I can pull it into the libtracefs repo.

Thanks!

-- Steve


> ---
>  include/tracefs-local.h | 12 ++++++++++++
>  tracefs-events.c        |  1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/include/tracefs-local.h b/include/tracefs-local.h
> index 9cc371b..bdbf89e 100644
> --- a/include/tracefs-local.h
> +++ b/include/tracefs-local.h
> @@ -13,4 +13,16 @@ void warning(const char *fmt, ...);
>  int str_read_file(const char *file, char **buffer);
>  char *trace_append_file(const char *dir, const char *name);
>  
> +#ifndef ACCESSPERMS
> +#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
> +#endif
> +
> +#ifndef ALLPERMS
> +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
> +#endif
> +
> +#ifndef DEFFILEMODE
> +#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666*/
> +#endif
> +
>  #endif /* _TRACE_FS_LOCAL_H */
> diff --git a/tracefs-events.c b/tracefs-events.c
> index ca1d22b..ee45988 100644
> --- a/tracefs-events.c
> +++ b/tracefs-events.c
> @@ -13,6 +13,7 @@
>  #include <errno.h>
>  #include <sys/stat.h>
>  #include <fcntl.h>
> +#include <limits.h>
>  
>  #include <traceevent/kbuffer.h>
>  


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libtracefs: make it build against musl C library
  2020-12-02 14:36 ` Steven Rostedt
@ 2020-12-02 18:43   ` Beniamin Sandu
  2020-12-02 19:23     ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Beniamin Sandu @ 2020-12-02 18:43 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Tzvetomir Stoyanov (VMware), Linux Trace Devel

Hey guys,

Sorry to hijack your thread, my previous replies got bounced back by
the mailing list (although I sent them in Plain Text mode), so just
trying again now to see if it works...

Cheers,
Beni

În mie., 2 dec. 2020 la 16:36, Steven Rostedt <rostedt@goodmis.org> a scris:
>
> On Wed,  2 Dec 2020 06:08:02 +0200
> "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
>
> > From: Beniamin Sandu <beniaminsandu@gmail.com>
> >
> > * add some missing headers and macros
> > * set pthread affinity using pthread_setaffinity_np after creating the thread
> > instead of pthread_attr_setaffinity_np (which seems to not be implemented
> > in musl)
> >
> > Tested using https://musl.cc/x86_64-linux-musl-native.tgz
> >
> > Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com
> >
> > Reviewed-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
> > [ Fixed a whitespace issue ]
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> Tzvetomir,
>
> FYI, when sending patches, even for those you are not the author for,
> you are still required to add a Signed-off-by.
>
> Please add that here, and I can pull it into the libtracefs repo.
>
> Thanks!
>
> -- Steve
>
>
> > ---
> >  include/tracefs-local.h | 12 ++++++++++++
> >  tracefs-events.c        |  1 +
> >  2 files changed, 13 insertions(+)
> >
> > diff --git a/include/tracefs-local.h b/include/tracefs-local.h
> > index 9cc371b..bdbf89e 100644
> > --- a/include/tracefs-local.h
> > +++ b/include/tracefs-local.h
> > @@ -13,4 +13,16 @@ void warning(const char *fmt, ...);
> >  int str_read_file(const char *file, char **buffer);
> >  char *trace_append_file(const char *dir, const char *name);
> >
> > +#ifndef ACCESSPERMS
> > +#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
> > +#endif
> > +
> > +#ifndef ALLPERMS
> > +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
> > +#endif
> > +
> > +#ifndef DEFFILEMODE
> > +#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666*/
> > +#endif
> > +
> >  #endif /* _TRACE_FS_LOCAL_H */
> > diff --git a/tracefs-events.c b/tracefs-events.c
> > index ca1d22b..ee45988 100644
> > --- a/tracefs-events.c
> > +++ b/tracefs-events.c
> > @@ -13,6 +13,7 @@
> >  #include <errno.h>
> >  #include <sys/stat.h>
> >  #include <fcntl.h>
> > +#include <limits.h>
> >
> >  #include <traceevent/kbuffer.h>
> >
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libtracefs: make it build against musl C library
  2020-12-02 18:43   ` Beniamin Sandu
@ 2020-12-02 19:23     ` Steven Rostedt
  2020-12-02 19:31       ` Beniamin Sandu
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2020-12-02 19:23 UTC (permalink / raw)
  To: Beniamin Sandu; +Cc: Tzvetomir Stoyanov (VMware), Linux Trace Devel

On Wed, 2 Dec 2020 20:43:58 +0200
Beniamin Sandu <beniaminsandu@gmail.com> wrote:

> Hey guys,
> 
> Sorry to hijack your thread, my previous replies got bounced back by
> the mailing list (although I sent them in Plain Text mode), so just
> trying again now to see if it works...
> 

I see this in both my INBOX and in my trace-devel folder.

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libtracefs: make it build against musl C library
  2020-12-02 19:23     ` Steven Rostedt
@ 2020-12-02 19:31       ` Beniamin Sandu
  0 siblings, 0 replies; 5+ messages in thread
From: Beniamin Sandu @ 2020-12-02 19:31 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Tzvetomir Stoyanov (VMware), Linux Trace Devel

On Wed, Dec 2, 2020 at 9:23 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Wed, 2 Dec 2020 20:43:58 +0200
> Beniamin Sandu <beniaminsandu@gmail.com> wrote:
>
> > Hey guys,
> >
> > Sorry to hijack your thread, my previous replies got bounced back by
> > the mailing list (although I sent them in Plain Text mode), so just
> > trying again now to see if it works...
> >
>
> I see this in both my INBOX and in my trace-devel folder.
>
> -- Steve
Yep, looks like it's working now.
Thanks for the reply and for accepting my patch!

/Beni

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-02 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02  4:08 [PATCH] libtracefs: make it build against musl C library Tzvetomir Stoyanov (VMware)
2020-12-02 14:36 ` Steven Rostedt
2020-12-02 18:43   ` Beniamin Sandu
2020-12-02 19:23     ` Steven Rostedt
2020-12-02 19:31       ` Beniamin Sandu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.