diff --git a/xbob/io/include/xbob.io/api.h b/xbob/io/include/xbob.io/api.h
index 51b6c8d802fa9d477e6370cdc03c2ec13dae538b..c37d6e4cd9216bbb22f04d7e6c842dda37167682 100644
--- a/xbob/io/include/xbob.io/api.h
+++ b/xbob/io/include/xbob.io/api.h
@@ -266,6 +266,8 @@ typedef struct {
 
 # define PyBobIoHDF5File_Converter (*(PyBobIoHDF5File_Converter_RET (*)PyBobIoHDF5File_Converter_PROTO) PyXbobIo_API[PyBobIoHDF5File_Converter_NUM])
 
+# if !defined(NO_IMPORT_ARRAY)
+
   /**
    * Returns -1 on error, 0 on success. PyCapsule_Import will set an exception
    * if there's an error.
@@ -320,6 +322,8 @@ typedef struct {
 
   }
 
+# endif //!defined(NO_IMPORT_ARRAY)
+
 #endif /* XBOB_IO_MODULE */
 
 #endif /* XBOB_IO_H */