Skip to content

Commit ea810b7

Browse files
committed
lightningd: don't declare local vars stdin and stdout.
OpenBSD uses macros for these, and gets upset. Fixes: #4044 Signed-off-by: Rusty Russell <[email protected]>
1 parent f1d5fdf commit ea810b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightningd/plugin.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ void plugins_add_default_dir(struct plugins *plugins)
12951295
const char *plugin_send_getmanifest(struct plugin *p)
12961296
{
12971297
char **cmd;
1298-
int stdin, stdout;
1298+
int stdinfd, stdoutfd;
12991299
struct jsonrpc_request *req;
13001300
bool debug = false;
13011301

@@ -1308,7 +1308,7 @@ const char *plugin_send_getmanifest(struct plugin *p)
13081308
cmd[0] = p->cmd;
13091309
if (debug)
13101310
cmd[1] = "--debugger";
1311-
p->pid = pipecmdarr(&stdin, &stdout, &pipecmd_preserve, cmd);
1311+
p->pid = pipecmdarr(&stdinfd, &stdoutfd, &pipecmd_preserve, cmd);
13121312
if (p->pid == -1)
13131313
return tal_fmt(p, "opening pipe: %s", strerror(errno));
13141314

@@ -1319,8 +1319,8 @@ const char *plugin_send_getmanifest(struct plugin *p)
13191319

13201320
/* Create two connections, one read-only on top of p->stdout, and one
13211321
* write-only on p->stdin */
1322-
p->stdout_conn = io_new_conn(p, stdout, plugin_stdout_conn_init, p);
1323-
p->stdin_conn = io_new_conn(p, stdin, plugin_stdin_conn_init, p);
1322+
p->stdout_conn = io_new_conn(p, stdoutfd, plugin_stdout_conn_init, p);
1323+
p->stdin_conn = io_new_conn(p, stdinfd, plugin_stdin_conn_init, p);
13241324
req = jsonrpc_request_start(p, "getmanifest", p->log,
13251325
plugin_manifest_cb, p);
13261326
/* Adding allow-deprecated-apis is part of the deprecation cycle! */

0 commit comments

Comments
 (0)