Re: [PATCH] trace-listen: add missing header

From: Steven Rostedt
Date: Thu Jun 29 2017 - 08:20:15 EST


On Thu, 29 Jun 2017 14:46:21 +0300
Baruch Siach <baruch@xxxxxxxxxx> 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@xxxxxxxxxx>
> ---
> 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"