diff --git a/wire/tlvstream.c b/wire/tlvstream.c index 6e08981a5..93b91afa9 100644 --- a/wire/tlvstream.c +++ b/wire/tlvstream.c @@ -48,7 +48,7 @@ static struct tlv_field *tlvstream_get_raw(struct tlv_field *stream, u64 type) return NULL; } -void tlvstream_set_raw(struct tlv_field **stream, u64 type, void *value TAKES, size_t valuelen) +void tlvstream_set_raw(struct tlv_field **stream, u64 type, const void *value TAKES, size_t valuelen) { struct tlv_field f, *e = tlvstream_get_raw(*stream, type); diff --git a/wire/tlvstream.h b/wire/tlvstream.h index 014d11c55..d9bcfbe48 100644 --- a/wire/tlvstream.h +++ b/wire/tlvstream.h @@ -65,7 +65,7 @@ size_t tlv_field_offset(const u8 *tlvstream, size_t tlvlen, u64 fieldtype); extern const u64 *FROMWIRE_TLV_ANY_TYPE; /* Generic primitive setters for tlvstreams. */ -void tlvstream_set_raw(struct tlv_field **stream, u64 type, void *value TAKES, size_t valuelen); +void tlvstream_set_raw(struct tlv_field **stream, u64 type, const void *value TAKES, size_t valuelen); void tlvstream_set_short_channel_id(struct tlv_field **stream, u64 type, struct short_channel_id *value); void tlvstream_set_tu64(struct tlv_field **stream, u64 type, u64 value);