Fix conflict with macros defined in kern/queue.h https://trac.macports.org/ticket/60088 --- src/tuntap.h.orig 2014-11-04 10:35:06.000000000 +1100 +++ src/tuntap.h 2021-12-23 16:02:21.000000000 +1100 @@ -170,10 +170,10 @@ class tuntap_mbuf_queue { /* enqueue an mbuf. returns true if there was space left, so the mbuf could be * queued, false otherwise */ - bool enqueue(mbuf_t mb); + bool mb_enqueue(mbuf_t mb); /* tries to dequeue the next mbuf. If the queue is empty, NULL is returned */ - mbuf_t dequeue(); + mbuf_t mb_dequeue(); /* makes the queue empty, discarding any queue packets */ void clear(); --- src/tuntap.cc.orig 2014-11-04 10:35:06.000000000 +1100 +++ src/tuntap.cc 2021-12-23 16:02:36.000000000 +1100 @@ -210,7 +210,7 @@ tuntap_mbuf_queue::~tuntap_mbuf_queue() } bool -tuntap_mbuf_queue::enqueue(mbuf_t mb) +tuntap_mbuf_queue::mb_enqueue(mbuf_t mb) { if (size == QUEUE_SIZE) return false; @@ -229,7 +229,7 @@ tuntap_mbuf_queue::enqueue(mbuf_t mb) } mbuf_t -tuntap_mbuf_queue::dequeue() +tuntap_mbuf_queue::mb_dequeue() { mbuf_t ret; @@ -556,7 +556,7 @@ tuntap_interface::cdev_read(uio_t uio, i while (cur_mbuf == NULL) { dprintf("tuntap: fetching new mbuf\n"); - cur_mbuf = send_queue.dequeue(); + cur_mbuf = send_queue.mb_dequeue(); if (cur_mbuf == NULL) { /* nothing in queue, block or return */ if (!block_io) { @@ -800,7 +800,7 @@ tuntap_interface::if_output(mbuf_t m) auto_lock l(&lock); - if (!send_queue.enqueue(pkt)) { + if (!send_queue.mb_enqueue(pkt)) { mbuf_freem(pkt); mbuf_freem_list(m); return ENOBUFS;