+#ifdef HAVE_STRUCT_UTIMBUF
+int
+Mono_Posix_FromUtimbuf (struct Mono_Posix_Utimbuf *from, struct utimbuf *to)
+{
+ _cnm_return_val_if_overflow (time_t, from->actime, -1);
+ _cnm_return_val_if_overflow (time_t, from->modtime, -1);
+
+ memset (to, 0, sizeof(*to));
+
+ to->actime = from->actime;
+ to->modtime = from->modtime;
+
+ return 0;
+}
+#endif /* ndef HAVE_STRUCT_UTIMBUF */
+
+
+#ifdef HAVE_STRUCT_UTIMBUF
+int
+Mono_Posix_ToUtimbuf (struct utimbuf *from, struct Mono_Posix_Utimbuf *to)
+{
+ _cnm_return_val_if_overflow (gint64, from->actime, -1);
+ _cnm_return_val_if_overflow (gint64, from->modtime, -1);
+
+ memset (to, 0, sizeof(*to));
+
+ to->actime = from->actime;
+ to->modtime = from->modtime;
+
+ return 0;
+}
+#endif /* ndef HAVE_STRUCT_UTIMBUF */
+
+