summaryrefslogtreecommitdiff
path: root/src/polkitagent
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2014-01-20 15:34:53 +0800
committerColin Walters <walters@verbum.org>2014-02-18 19:25:41 -0500
commit815dfc64d40cb0267cb96701409c04b4196e508a (patch)
treea3a10fd9895926609c3c76fca0cf1d7046ddfd57 /src/polkitagent
parentfb0d00225c401a521430ddf232a11965cdc5dd44 (diff)
downloadpolkit-815dfc64d40cb0267cb96701409c04b4196e508a.tar.gz
build: Fix several issues on FreeBSD
1. Fallback to fsync() if fdatasync() is not available. 2. Check whether setnetgrent() has a return value. 3. Check whether the system has SIGPOLL. 4. Add configure option to disable test. mocklibc cannot be built on FreeBSD because of function prototype conflict. https://bugs.freedesktop.org/show_bug.cgi?id=73821
Diffstat (limited to 'src/polkitagent')
-rw-r--r--src/polkitagent/polkitagenthelperprivate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/polkitagent/polkitagenthelperprivate.c b/src/polkitagent/polkitagenthelperprivate.c
index 4417e70..cfa77fc 100644
--- a/src/polkitagent/polkitagenthelperprivate.c
+++ b/src/polkitagent/polkitagenthelperprivate.c
@@ -103,7 +103,12 @@ flush_and_wait ()
{
fflush (stdout);
fflush (stderr);
+#ifdef HAVE_FDATASYNC
fdatasync (fileno(stdout));
fdatasync (fileno(stderr));
+#else
+ fsync (fileno(stdout));
+ fsync (fileno(stderr));
+#endif
usleep (100 * 1000);
}