Skip to content

Commit a6ea428

Browse files
committed
fuzz: fix build undr FreeBSD.
They have a `struct splice` already: ``` 2025-10-22T08:33:39.2432203Z tests/fuzz/fuzz-wire-splice.c:6:8: error: redefinition of 'splice' 2025-10-22T08:33:39.2434453Z 6 | struct splice { 2025-10-22T08:33:39.2435520Z | ^ 2025-10-22T08:33:39.2436087Z /usr/include/sys/socket.h:683:8: note: previous definition is here 2025-10-22T08:33:39.2436709Z 683 | struct splice { ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent d8ee3a5 commit a6ea428

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/fuzz/fuzz-wire-splice.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
#include <tests/fuzz/wire.h>
44
#include <wire/peer_wire.h>
55

6-
struct splice {
6+
struct fuzzsplice {
77
struct channel_id channel_id;
88
s64 relative_satoshis;
99
u32 funding_feerate_perkw;
1010
u32 locktime;
1111
struct pubkey funding_pubkey;
1212
};
1313

14-
static void *encode(const tal_t *ctx, const struct splice *s)
14+
static void *encode(const tal_t *ctx, const struct fuzzsplice *s)
1515
{
1616
return towire_splice(ctx, &s->channel_id,
1717
s->relative_satoshis, s->funding_feerate_perkw,
1818
s->locktime, &s->funding_pubkey);
1919
}
2020

21-
static struct splice *decode(const tal_t *ctx, const void *p)
21+
static struct fuzzsplice *decode(const tal_t *ctx, const void *p)
2222
{
23-
struct splice *s = tal(ctx, struct splice);
23+
struct fuzzsplice *s = tal(ctx, struct fuzzsplice);
2424

2525
if (fromwire_splice(p, &s->channel_id,
2626
&s->relative_satoshis, &s->funding_feerate_perkw,
@@ -29,12 +29,12 @@ static struct splice *decode(const tal_t *ctx, const void *p)
2929
return tal_free(s);
3030
}
3131

32-
static bool equal(const struct splice *x, const struct splice *y)
32+
static bool equal(const struct fuzzsplice *x, const struct fuzzsplice *y)
3333
{
3434
return memcmp(x, y, sizeof(*x)) == 0;
3535
}
3636

3737
void run(const u8 *data, size_t size)
3838
{
39-
test_decode_encode(data, size, WIRE_SPLICE, struct splice);
39+
test_decode_encode(data, size, WIRE_SPLICE, struct fuzzsplice);
4040
}

0 commit comments

Comments
 (0)