Lines 1-6
Link Here
|
1 |
--- src/xshmfence_alloc.c.orig 2015-03-04 15:28:23 UTC |
1 |
--- src/xshmfence_alloc.c.orig 2015-03-04 15:28:23 UTC |
2 |
+++ src/xshmfence_alloc.c |
2 |
+++ src/xshmfence_alloc.c |
3 |
@@ -79,7 +79,11 @@ xshmfence_alloc_shm(void) |
3 |
@@ -73,13 +73,21 @@ xshmfence_alloc_shm(void) |
|
|
4 |
fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING); |
5 |
if (fd < 0) |
6 |
#endif |
7 |
+#ifdef SHM_ANON |
8 |
+ fd = shm_open(SHM_ANON, O_RDWR|O_CLOEXEC, 0600); |
9 |
+ if (fd < 0) |
10 |
+#endif |
11 |
{ |
12 |
#ifdef O_TMPFILE |
13 |
fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); |
4 |
if (fd < 0) |
14 |
if (fd < 0) |
5 |
#endif |
15 |
#endif |
6 |
{ |
16 |
{ |