message: Hack around closedir crashing
diff: @@ -57,6 +57,8 @@ pub unsafe extern "C" fn opendir(path: *const c_char) -> *mut DIR {
  #[no_mangle]
  pub unsafe extern "C" fn closedir(dir: *mut DIR) -> c_int {
  +
  + let ret = {
  let mut dir = Box::from_raw(dir);
  let ret = Sys::close(*dir.file);
  @@ -64,6 +66,12 @@ pub unsafe extern "C" fn closedir(dir: *mut DIR) -> c_int {
  // Reference files aren't closed when dropped
  dir.file.reference = true;
  + //TODO: find out why dropping dir can crash
  + mem::forget(dir);
  +
  + ret
  + };
  +
  ret
  }
  