Skip to content

Commit

Permalink
tio: fix build on macOS Sequoia
Browse files Browse the repository at this point in the history
  • Loading branch information
aeiouaeiouaeiouaeiouaeiouaeiou committed Oct 25, 2024
1 parent 4588298 commit 61376c5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
6 changes: 5 additions & 1 deletion comms/tio/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ legacysupport.newest_darwin_requires_legacy 15

github.setup tio tio 3.7 v
github.tarball_from releases
revision 0
revision 1

categories comms
installs_libs no
Expand All @@ -37,6 +37,10 @@ depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:inih \
port:lua54

# https://github.com/tio/tio/issues/278
# remove this in the next release
patchfiles-append patch-replace-send.diff

use_xz yes

post-destroot {
Expand Down
24 changes: 24 additions & 0 deletions comms/tio/files/patch-replace-send.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 9fec68911769736ab2595fda911a835e5c21633b Mon Sep 17 00:00:00 2001
From: Martin Lund <[email protected]>
Date: Sun, 15 Sep 2024 05:57:31 +0200
Subject: [PATCH] Fix name declaration conflict with socket send()
--- src/script.c
+++ src/script.c
@@ -181,7 +181,7 @@ static int modem_send(lua_State *L)
}

// lua: send(string)
-static int send(lua_State *L)
+static int send_(lua_State *L)
{
const char *string = lua_tostring(L, 1);
int ret;
@@ -455,7 +455,7 @@ static const struct luaL_Reg tio_lib[] =
{ "msleep", msleep},
{ "line_set", line_set},
{ "modem_send", modem_send},
- { "send", send},
+ { "send", send_},
{ "read", read_string},
{ "expect", expect},
{ "exit", exit_},

0 comments on commit 61376c5

Please sign in to comment.