GNOME Bugzilla – Bug 563399
Fails to compile on OSX
Last modified: 2008-12-21 21:51:16 UTC
Please describe the problem: gconfd.c calls fdatasync(int). This function is not available on OSX. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information: This patch fixes the problem (and should do for any OS without fdatasync()): =================================================================== --- configure.in (revision 2715) +++ configure.in (working copy) @@ -205,7 +205,7 @@ AC_CHECK_HEADERS(syslog.h sys/wait.h) -AC_CHECK_FUNCS(getuid sigaction fsync fchmod fdwalk) +AC_CHECK_FUNCS(getuid sigaction fsync fchmod fdwalk fdatasync) LDAP_LIBS= Index: gconf/gconfd.c =================================================================== --- gconf/gconfd.c (revision 2715) +++ gconf/gconfd.c (working copy) @@ -1638,8 +1638,11 @@ goto out; } - +#ifdef HAVE_FDATASYNC if (fdatasync (fd) < 0) +#else + if (fsync (fd) < 0) +#endif { gconf_log (GCL_WARNING, _("Could not flush saved state file '%s' to disk: %s"),
Another bug got filed right after this one. Going to mark this one as a duplicate of that one, since that one has more information on the history of the bug. *** This bug has been marked as a duplicate of 563401 ***