diff --git a/Documentation/conf.py b/Documentation/conf.py
index 6f5ba2a56f2e7dba7787f65809cbf71fa0a2b689..0404784a6a45cee049eb6461f8a772742bc107f2 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -103,6 +103,7 @@ try:
     extensions.append("hawkmoth")
 
     cautodoc_root = os.path.abspath("..")
+    cautodoc_clang = "-D__SPHINX_DOC"
     has_hawkmoth = True
 except ImportError as e:
     if e.name == "clang":
diff --git a/epicardium/epicardium.h b/epicardium/epicardium.h
index 9add57508e7aa91b3bb0f718bec2aaeddb990817..c32120e87399e7ca455d2b00ad0b20579df5d1f2 100644
--- a/epicardium/epicardium.h
+++ b/epicardium/epicardium.h
@@ -1,14 +1,24 @@
 #ifndef _EPICARDIUM_H
 #define _EPICARDIUM_H
+
 #include <stdint.h>
-#include <stddef.h>
 #include <errno.h>
 
+#ifndef __SPHINX_DOC
+/* stddef.h is not recognized by hawkmoth for some odd reason */
+#include <stddef.h>
+#else
+typedef unsigned int size_t;
+#endif /* __SPHINX_DOC */
+
 /* clang-format off */
 #define API_INT_CTRL_C  1
 #define API_INT_BHI160  2
 #define API_INT_MAX     API_INT_BHI160
 
+/*
+ * These definitions are required for the code-generator.  Please don't touch!
+ */
 #ifndef API
 #define API(id, def) def
 #endif
diff --git a/epicardium/modules/stream.h b/epicardium/modules/stream.h
index 32c9e6e219bc7b7998babcd25236d2417d61b8c5..9d137a20e6fdf5b84e9e568b5e06a294069d1606 100644
--- a/epicardium/modules/stream.h
+++ b/epicardium/modules/stream.h
@@ -1,9 +1,15 @@
 #ifndef STREAM_H
 #define STREAM_H
 
-#include <stddef.h>
 #include <stdint.h>
 
+#ifndef __SPHINX_DOC
+/* stddef.h is not recognized by hawkmoth for some odd reason */
+#include <stddef.h>
+#else
+typedef unsigned int size_t;
+#endif /* __SPHINX_DOC */
+
 #include "FreeRTOS.h"
 #include "queue.h"