[dconf] Avoid posix_fallocate for now
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] Avoid posix_fallocate for now
- Date: Tue, 2 Nov 2010 15:23:58 +0000 (UTC)
commit e3dd1d8ac6839851cb3015e89cdf39ecb2e2b081
Author: Ryan Lortie <desrt desrt ca>
Date: Tue Nov 2 11:23:28 2010 -0400
Avoid posix_fallocate for now
Use ftruncate() instead. posix_fallocate() is not portable yet.
engine/dconf-engine.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index cf57431..2b8bd70 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -144,7 +144,7 @@ dconf_engine_setup_user (DConfEngine *engine)
if (fd >= 0)
{
- if (posix_fallocate (fd, 0, 1) == 0)
+ if (ftruncate (fd, 1) == 0)
{
engine->shm = mmap (NULL, 1, PROT_READ, MAP_SHARED, fd, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]