htobe is not portable.

pull/3798/merge
Nicholas Marriott 2024-01-17 09:47:35 +00:00
parent 66369416fc
commit 7d91b4b90b
1 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,6 @@
#include <limits.h>
#include <errno.h>
#include <endian.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@ -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 *);