diff --git a/hxnum.c b/hxnum.c
index d72bac6..deaba9b 100644
--- a/hxnum.c
+++ b/hxnum.c
@@ -28,6 +28,7 @@
 # endif
 #endif
 #include <stdlib.h>
+#include <getopt.h>
 #include <assert.h>
 #include "export.h"
 #include "types.e"
