From 7d91b4b90b1eac9fe04a2fab22013bfbb9ff5ee1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 17 Jan 2024 09:47:35 +0000 Subject: [PATCH] htobe is not portable. --- compat/imsg-buffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compat/imsg-buffer.c b/compat/imsg-buffer.c index 3de7a7c0..ea236efd 100644 --- a/compat/imsg-buffer.c +++ b/compat/imsg-buffer.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -32,6 +31,13 @@ #include "compat.h" #include "imsg.h" +#define htobe16 htons +#define htobe32 htonl +#define htobe64 htonll +#define be16toh ntohs +#define be32toh ntohl +#define be64toh ntohll + static int ibuf_realloc(struct ibuf *, size_t); static void ibuf_enqueue(struct msgbuf *, struct ibuf *); static void ibuf_dequeue(struct msgbuf *, struct ibuf *);