aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index dca0ddea..5aa4a0bf 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -1,3 +1,9 @@
+
+// Humor glibc to get dprintf, then #define it to something more portable.
+#define _GNU_SOURCE
+#include <stdio.h>
+#define fdprintf(...) dprintf(__VA_ARGS__)
+
#include <endian.h>
#if __BYTE_ORDER == __BIG_ENDIAN