$NetBSD: patch-aa,v 1.6 2013/10/17 04:28:33 wiz Exp $ fdatasync needs a writable file descriptor. --- update-mime-database.c.orig 2013-07-09 22:10:53.000000000 +0000 +++ update-mime-database.c @@ -951,7 +951,7 @@ static gboolean atomic_update(const gcha new_name = g_strndup(pathname, len - 4); #ifdef HAVE_FDATASYNC - fd = open(pathname, O_RDONLY); + fd = open(pathname, O_RDWR); if (fd == -1) { set_error_from_errno(error);