package/swupdate: fix build failure with luajit

Add local patche committed upstream to fix build failure due to missing
limits.h include.

This error happens when compiling swupdate with LuaJit. This can be
reproduced with the following configuration:

cat >configs/samba-bump_defconfig <<EOF
BR2_arm=y
BR2_cortex_a7=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_PACKAGE_SWUPDATE=y
BR2_PACKAGE_LUAJIT=y
EOF
make olddefconfig
make swupdate

Fixes:
https://autobuild.buildroot.org/results/6ed019be7ff0144679f150dbd67cec4dd31fdb15/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[thomas: add configuration]
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Giulio Benetti
2026-06-03 09:23:12 +02:00
committed by Thomas Perale
parent c84ebd03a5
commit 2f825f1bf8

View File

@@ -0,0 +1,30 @@
From 3de6491463f4b1ddf2e792771831acfb705e246d Mon Sep 17 00:00:00 2001
From: Stefano Babic <stefano.babic@swupdate.org>
Date: Tue, 11 Feb 2025 09:08:15 +0100
Subject: [PATCH] lua: add limits.h to set PATH_MAX
This fixes github action (debian slim), with other builds the file is
automatically included.
Upstream: https://github.com/sbabic/swupdate/commit/3de6491463f4b1ddf2e792771831acfb705e246d
Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
corelib/lua_interface.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c
index 02d48259..ffe62d88 100644
--- a/corelib/lua_interface.c
+++ b/corelib/lua_interface.c
@@ -16,6 +16,7 @@
#include <sys/sysmacros.h>
#endif
#include <sys/types.h>
+#include <limits.h>
#include "lua.h"
#include "lauxlib.h"
--
2.47.3