--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -20,6 +20,10 @@
#include <string.h>
#include <time.h>
+#ifdef __ANDROID__
+#include <getopt.h>
+#endif
+
#include "stream.h"
#include "msqldump.h"
#define LIBMUTILS 1