1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/5.4/tools/mkimage/patches/900-mkimage-Use-PATH_MAX-for-path-length.patch
Ycarus (Yannick Chabanois) cfce9f52b2 Kernel 5.4 RUTX support
2023-08-14 17:47:02 +02:00

21 lines
688 B
Diff

diff --git a/tools/mkimage.h b/tools/mkimage.h
index f5ca65e2ed..d92a3ff811 100644
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -17,6 +17,7 @@
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
+#include <limits.h>
#include <u-boot/sha1.h>
#include "fdt_host.h"
#include "imagetool.h"
@@ -44,7 +45,7 @@ static inline ulong map_to_sysmem(void *ptr)
#define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size]
#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
-#define MKIMAGE_MAX_TMPFILE_LEN 256
+#define MKIMAGE_MAX_TMPFILE_LEN PATH_MAX
#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
#define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35