diff options
author | Antoine Jacoutot <ajacoutot@gnome.org> | 2012-11-01 12:17:04 +0100 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-11-05 08:32:51 -0500 |
commit | bcd9ea89be7232d45d40a647660472c1f7ada61e (patch) | |
tree | dec28d10190b7e972ea10e367337c1f1c096f5c9 /shm | |
parent | 682671c31a8d0d232c18973dc202b631941dcd8f (diff) | |
download | dconf-bcd9ea89be7232d45d40a647660472c1f7ada61e.tar.gz |
workaround OpenBSD mmap() bug
On OpenBSD, mapping descriptors PROT_WRITE without also specifying
PROT_READ triggers a segfault.
Diffstat (limited to 'shm')
-rw-r--r-- | shm/dconf-shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shm/dconf-shm.c b/shm/dconf-shm.c index 10bfec9..e47e377 100644 --- a/shm/dconf-shm.c +++ b/shm/dconf-shm.c @@ -134,7 +134,7 @@ dconf_shm_flag (const gchar *name) * * Using mmap() works everywhere. */ - shm = mmap (NULL, 1, PROT_WRITE, MAP_SHARED, fd, 0); + shm = mmap (NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); g_assert (shm != MAP_FAILED); *shm = 1; |