diff --git a/examples/read_rsa_key.c b/examples/read_rsa_key.c
index 2b53f035ff2a4f3ee26e6e62197d0b315af93522..1d092e70a3c29294733b1af851a4870597506f9f 100644
--- a/examples/read_rsa_key.c
+++ b/examples/read_rsa_key.c
@@ -24,6 +24,8 @@
 # include "config.h"
 #endif
 
+#include <stdlib.h>
+
 #include "io.h"
 #include "rsa.h"