Skip to content

Build error on OpenBSD -current #4044

@grubles

Description

@grubles

Issue and Steps to Reproduce

Compiling v0.9.0-1 fails due to the following error when using using OpenBSD clang version 10.0.1:

lightningd/plugin.c:1231:6: error: expected identifier or '('
        int stdin, stdout;
            ^
/usr/include/stdio.h:197:16: note: expanded from macro 'stdin'
#define stdin   (&__sF[0])
                 ^
lightningd/plugin.c:1231:6: error: expected ')'
/usr/include/stdio.h:197:16: note: expanded from macro 'stdin'
#define stdin   (&__sF[0])
                 ^
lightningd/plugin.c:1231:6: note: to match this '('
/usr/include/stdio.h:197:15: note: expanded from macro 'stdin'
#define stdin   (&__sF[0])
                ^
lightningd/plugin.c:1244:22: error: cannot take the address of an rvalue of type 'FILE *' (aka 'struct __sFILE *')
        p->pid = pipecmdarr(&stdin, &stdout, &pipecmd_preserve, cmd);
                            ^~~~~~
lightningd/plugin.c:1244:30: error: cannot take the address of an rvalue of type 'FILE *' (aka 'struct __sFILE *')
        p->pid = pipecmdarr(&stdin, &stdout, &pipecmd_preserve, cmd);
                                    ^~~~~~~
lightningd/plugin.c:1253:19: error: incompatible pointer to integer conversion passing 'FILE *' (aka 'struct __sFILE *') to parameter of type 'int'
      [-Werror,-Wint-conversion]
        p->stdout_conn = io_new_conn(p, stdout, plugin_stdout_conn_init, p);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ccan/ccan/io/io.h:59:22: note: expanded from macro 'io_new_conn'
        io_new_conn_((ctx), (fd),                                       \
                            ^~~~
ccan/ccan/io/io.h:65:52: note: passing argument to parameter 'fd' here
struct io_conn *io_new_conn_(const tal_t *ctx, int fd,
                                                   ^
lightningd/plugin.c:1254:18: error: incompatible pointer to integer conversion passing 'FILE *' (aka 'struct __sFILE *') to parameter of type 'int'
      [-Werror,-Wint-conversion]
        p->stdin_conn = io_new_conn(p, stdin, plugin_stdin_conn_init, p);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ccan/ccan/io/io.h:59:22: note: expanded from macro 'io_new_conn'
        io_new_conn_((ctx), (fd),                                       \
                            ^~~~
ccan/ccan/io/io.h:65:52: note: passing argument to parameter 'fd' here
struct io_conn *io_new_conn_(const tal_t *ctx, int fd,
                                                   ^
6 errors generated.
gmake: *** [Makefile:250: lightningd/plugin.o] Error 1
rm external/amd64-unknown-openbsd6.8/libwally-core-build/src/secp256k1/libsecp256k1.la
bsd$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions