diff --git a/serial.c b/serial.c
index e2a2df2..681dc57 100644
--- a/serial.c
+++ b/serial.c
@@ -25,37 +25,6 @@
 
 #define pr_fmt(x) "serial: " x
 
-/*
- * @fn: A function that will copy data from the buffer at src into the dst object
- * @dst: An opaque object to pass as state to fn
- * @src: A pointer to the buffer of data to copy to dst
- * @len: The length of the data pointed to by src
- * @return: 0 on succes, negative error code on failure
- *
- * Pre-condition: fn returns a write count or a negative error code
- * Post-condition: All bytes written or an error has occurred
- */
-#define mctp_write_all(fn, dst, src, len)                                      \
-	({                                                                     \
-		typeof(src) __src = src;                                       \
-		ssize_t wrote;                                                 \
-		while (len) {                                                  \
-			wrote = fn(dst, __src, len);                           \
-			if (wrote < 0)                                         \
-				break;                                         \
-			__src += wrote;                                        \
-			len -= wrote;                                          \
-		}                                                              \
-		len ? wrote : 0;                                               \
-	})
-
-static ssize_t mctp_serial_write(int fildes, const void *buf, size_t nbyte)
-{
-	ssize_t wrote;
-
-	return ((wrote = write(fildes, buf, nbyte)) < 0) ? -errno : wrote;
-}
-
 #include "libmctp.h"
 #include "libmctp-alloc.h"
 #include "libmctp-log.h"
@@ -110,6 +79,40 @@
 	uint8_t flag;
 };
 
+/*
+ * @fn: A function that will copy data from the buffer at src into the dst object
+ * @dst: An opaque object to pass as state to fn
+ * @src: A pointer to the buffer of data to copy to dst
+ * @len: The length of the data pointed to by src
+ * @return: 0 on succes, negative error code on failure
+ *
+ * Pre-condition: fn returns a write count or a negative error code
+ * Post-condition: All bytes written or an error has occurred
+ */
+static ssize_t mctp_write_all(mctp_serial_tx_fn fn, void *dst, uint8_t *src,
+			      size_t len)
+{
+	uint8_t *__src = src;
+	ssize_t wrote;
+	while (len) {
+		wrote = fn(dst, __src, len);
+		if (wrote < 0) {
+			break;
+		}
+		__src += wrote;
+		len -= wrote;
+	}
+	return len ? wrote : 0;
+}
+
+static int mctp_serial_write(void *fildesp, void *buf, size_t nbyte)
+{
+	ssize_t wrote;
+	int fildes = *((int *)fildesp);
+
+	return ((wrote = write(fildes, buf, nbyte)) < 0) ? -errno : wrote;
+}
+
 static size_t mctp_serial_pkt_escape(struct mctp_pktbuf *pkt, uint8_t *buf)
 {
 	uint8_t total_len;
@@ -176,7 +179,7 @@
 	len += sizeof(*hdr) + sizeof(*tlr);
 
 	if (!serial->tx_fn)
-		return mctp_write_all(mctp_serial_write, serial->fd,
+		return mctp_write_all(mctp_serial_write, &serial->fd,
 				      &serial->txbuf[0], len);
 
 	return mctp_write_all(serial->tx_fn, serial->tx_fn_data,
