diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2014-01-20 15:34:53 +0800 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-02-18 19:25:41 -0500 |
commit | 815dfc64d40cb0267cb96701409c04b4196e508a (patch) | |
tree | a3a10fd9895926609c3c76fca0cf1d7046ddfd57 /src/polkitagent | |
parent | fb0d00225c401a521430ddf232a11965cdc5dd44 (diff) | |
download | polkit-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.c | 5 |
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); } |