* [PATCH] trace-listen: add missing header
@ 2017-06-29 11:46 Baruch Siach
2017-06-29 12:19 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2017-06-29 11:46 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar; +Cc: linux-kernel, Baruch Siach
The PATH_MAX macro requires the limits.h header. This fixes build with musl
libc:
.../trace-cmd-trace-cmd-v2.6.1/trace-listen.c: In function ‘make_pid_name’:
.../trace-cmd-trace-cmd-v2.6.1/trace-listen.c:167:16: error: ‘PATH_MAX’ undeclared (first use in this function)
snprintf(buf, PATH_MAX, VAR_RUN_DIR "/trace-cmd-net.pid");
^~~~~~~~
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
trace-listen.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/trace-listen.c b/trace-listen.c
index 17ff9d8c160c..838d6bcf3649 100644
--- a/trace-listen.c
+++ b/trace-listen.c
@@ -31,6 +31,7 @@
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
+#include <limits.h>
#include "trace-local.h"
#include "trace-msg.h"
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] trace-listen: add missing header
2017-06-29 11:46 [PATCH] trace-listen: add missing header Baruch Siach
@ 2017-06-29 12:19 ` Steven Rostedt
2017-06-29 12:29 ` Baruch Siach
0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2017-06-29 12:19 UTC (permalink / raw)
To: Baruch Siach; +Cc: Ingo Molnar, linux-kernel
On Thu, 29 Jun 2017 14:46:21 +0300
Baruch Siach <baruch@tkos.co.il> wrote:
> The PATH_MAX macro requires the limits.h header. This fixes build with musl
> libc:
>
> .../trace-cmd-trace-cmd-v2.6.1/trace-listen.c: In function ‘make_pid_name’:
> .../trace-cmd-trace-cmd-v2.6.1/trace-listen.c:167:16: error: ‘PATH_MAX’ undeclared (first use in this function)
> snprintf(buf, PATH_MAX, VAR_RUN_DIR "/trace-cmd-net.pid");
> ^~~~~~~~
Thanks! I have a few other patches that need to go into trace-cmd. I'll
try to get to that today or tomorrow.
-- Steve
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> trace-listen.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/trace-listen.c b/trace-listen.c
> index 17ff9d8c160c..838d6bcf3649 100644
> --- a/trace-listen.c
> +++ b/trace-listen.c
> @@ -31,6 +31,7 @@
> #include <fcntl.h>
> #include <signal.h>
> #include <errno.h>
> +#include <limits.h>
>
> #include "trace-local.h"
> #include "trace-msg.h"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trace-listen: add missing header
2017-06-29 12:19 ` Steven Rostedt
@ 2017-06-29 12:29 ` Baruch Siach
2017-06-29 12:57 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2017-06-29 12:29 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Ingo Molnar, linux-kernel
Hi Steven,
On Thu, Jun 29, 2017 at 08:19:56AM -0400, Steven Rostedt wrote:
> On Thu, 29 Jun 2017 14:46:21 +0300
> Baruch Siach <baruch@tkos.co.il> wrote:
>
> > The PATH_MAX macro requires the limits.h header. This fixes build with musl
> > libc:
> >
> > .../trace-cmd-trace-cmd-v2.6.1/trace-listen.c: In function ‘make_pid_name’:
> > .../trace-cmd-trace-cmd-v2.6.1/trace-listen.c:167:16: error: ‘PATH_MAX’ undeclared (first use in this function)
> > snprintf(buf, PATH_MAX, VAR_RUN_DIR "/trace-cmd-net.pid");
> > ^~~~~~~~
>
> Thanks! I have a few other patches that need to go into trace-cmd. I'll
> try to get to that today or tomorrow.
There is no rush.
By the way, using both MAX_PATH (local) and PATH_MAX (system) macros in the
same file might bite at some point. Also, MAX_PATH has different values in
different files.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trace-listen: add missing header
2017-06-29 12:29 ` Baruch Siach
@ 2017-06-29 12:57 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2017-06-29 12:57 UTC (permalink / raw)
To: Baruch Siach; +Cc: Ingo Molnar, linux-kernel
On Thu, 29 Jun 2017 15:29:39 +0300
Baruch Siach <baruch@tkos.co.il> wrote:
> Hi Steven,
>
> On Thu, Jun 29, 2017 at 08:19:56AM -0400, Steven Rostedt wrote:
> > On Thu, 29 Jun 2017 14:46:21 +0300
> > Baruch Siach <baruch@tkos.co.il> wrote:
> >
> > > The PATH_MAX macro requires the limits.h header. This fixes build with musl
> > > libc:
> > >
> > > .../trace-cmd-trace-cmd-v2.6.1/trace-listen.c: In function ‘make_pid_name’:
> > > .../trace-cmd-trace-cmd-v2.6.1/trace-listen.c:167:16: error: ‘PATH_MAX’ undeclared (first use in this function)
> > > snprintf(buf, PATH_MAX, VAR_RUN_DIR "/trace-cmd-net.pid");
> > > ^~~~~~~~
> >
> > Thanks! I have a few other patches that need to go into trace-cmd. I'll
> > try to get to that today or tomorrow.
>
> There is no rush.
>
> By the way, using both MAX_PATH (local) and PATH_MAX (system) macros in the
> same file might bite at some point. Also, MAX_PATH has different values in
> different files.
Yeah, that code should be cleaned up. It was probably me rushing to get
some feature in and not spending the time to do it nicely.
Feel free to send more patches ;-)
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-29 12:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 11:46 [PATCH] trace-listen: add missing header Baruch Siach
2017-06-29 12:19 ` Steven Rostedt
2017-06-29 12:29 ` Baruch Siach
2017-06-29 12:57 ` Steven Rostedt
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.