packages/lang/lua-rs232/patches/110-add-static.patch
Rosen Penev 5ac581c3e5
lua-rs232: Update to latest git version
Last release was from 2012. Latest git has many additions.

Cleaned up Makefile and eliminated build hacks.

Added InstallDev section.

Added PKG_BUILD_PARALLEL for faster compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-07 10:39:14 -08:00

31 lines
797 B
Diff

--- a/bindings/lua/luars232.c
+++ b/bindings/lua/luars232.c
@@ -529,7 +529,7 @@ static void create_metatables(lua_State *L, const char *name, const luaL_reg *me
#endif
}
-RS232_LIB int luaopen_luars232(lua_State *L)
+RS232_LIB static int luaopen_luars232(lua_State *L)
{
int i;
create_metatables(L, MODULE_NAMESPACE, port_methods);
@@ -560,6 +560,7 @@ RS232_LIB int luaopen_luars232(lua_State *L)
return 1;
}
-RS232_LIB int luaopen_rs232_core(lua_State *L){
+__attribute__((unused))
+RS232_LIB static int luaopen_rs232_core(lua_State *L){
return luaopen_luars232(L);
}
--- a/include/librs232/rs232.h
+++ b/include/librs232/rs232.h
@@ -134,7 +134,7 @@ enum rs232_flow_e {
enum rs232_status_e {
RS232_PORT_CLOSED,
- RS232_PORT_OPEN,
+ RS232_PORT_OPEN
};
enum rs232_dtr_e {