Skip to contentSkip to conversation

trace-cmd utest: Add PATH_MAX if it is not already defined

PATCH New Steven Rostedt 1 participant 1 message Feb 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd utest: Add PATH_MAX if it is not already defined

From: "Steven Rostedt (Google)" <[email protected]>

In some setups PATH_MAX may not be defined (it is usually defined in linux/limits.h), but we just use PATH_MAX as something to hold the paths to the tracing files. In that case, just define it to 1024 if it's not already defined.

---
 utest/tracecmd-utest.c | 4 ++++
 1 file changed, 4 insertions(+)
utest/tracecmd-utest.c +4 -0
index 5dce3e94df6a..164f5da1f06a 100644
@@ -22,6 +22,10 @@
 
 #include "trace-utest.h"
 
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
 static char tracecmd_exec[PATH_MAX];
 
 #define TRACECMD_SUITE		"trace-cmd"
Signature · 1 line
2.43.0