ltq-ifxos: fix missing-prototypes build warning
authorShiji Yang <[email protected]>
Sat, 10 May 2025 09:19:18 +0000 (17:19 +0800)
committerHauke Mehrtens <[email protected]>
Sat, 18 Oct 2025 12:21:01 +0000 (14:21 +0200)
Add prototype definition for exported function IFX_Var_Fifo_getRoom().

Signed-off-by: Shiji Yang <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/18744
Signed-off-by: Robert Marko <[email protected]>
(cherry picked from commit e9d3e0f1dacc8a8052db3e45562ca6c71a496f09)
Signed-off-by: Nora Matthias Schiffer <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20440
Signed-off-by: Hauke Mehrtens <[email protected]>
package/kernel/lantiq/ltq-ifxos/patches/101-add-missing-prototype-for-IFX_Var_Fifo_getRoom.patch [new file with mode: 0644]

diff --git a/package/kernel/lantiq/ltq-ifxos/patches/101-add-missing-prototype-for-IFX_Var_Fifo_getRoom.patch b/package/kernel/lantiq/ltq-ifxos/patches/101-add-missing-prototype-for-IFX_Var_Fifo_getRoom.patch
new file mode 100644 (file)
index 0000000..0d35f63
--- /dev/null
@@ -0,0 +1,26 @@
+From: Shiji Yang <[email protected]>
+Date: Wed, 7 May 2025 20:24:34 +0800
+Subject: [PATCH] add missing prototype for IFX_Var_Fifo_getRoom()
+
+Fix build warning on 6.12 kernel:
+
+/home/db/owrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/ifxos-ugw_8.5.2.10/src/common/ifx_fifo.c:532:14: error: no previous prototype for 'IFX_Var_Fifo_getRoom' [-Werror=missing-prototypes]
+  532 | IFX_uint32_t IFX_Var_Fifo_getRoom (IFX_VFIFO *pFifo)
+      |              ^~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Shiji Yang <[email protected]>
+---
+ src/include/ifx_fifo.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/include/ifx_fifo.h
++++ b/src/include/ifx_fifo.h
+@@ -104,6 +104,8 @@ extern IFX_int8_t   IFX_Var_Fifo_isFull
+                            IFX_VFIFO *pFifo);
+ extern IFX_uint32_t IFX_Var_Fifo_getCount(
+                            IFX_VFIFO *pFifo);
++extern IFX_uint32_t IFX_Var_Fifo_getRoom(
++                           IFX_VFIFO *pFifo);
+ #ifdef __cplusplus
+ }