summaryrefslogtreecommitdiff
path: root/src/xshmfence.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-11-20 08:30:44 -0800
committerKeith Packard <keithp@keithp.com>2013-11-20 14:13:08 -0800
commitc17583d05872e4d9fb39af1a9963dc3738556b27 (patch)
tree7602e1de2b00c5895150922624ad3bc2f3c30926 /src/xshmfence.c
parentb394d499eeb6abb0f23a629f22f6634f137d279e (diff)
downloadxorg-lib-libxshmfence-c17583d05872e4d9fb39af1a9963dc3738556b27.tar.gz
Locate directory for shared memory files at configure time
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'src/xshmfence.c')
-rw-r--r--src/xshmfence.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xshmfence.c b/src/xshmfence.c
index 83049de..ecf2f4a 100644
--- a/src/xshmfence.c
+++ b/src/xshmfence.c
@@ -20,6 +20,10 @@
* OF THIS SOFTWARE.
*/
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xshmfenceint.h"
struct xshmfence {
@@ -106,7 +110,7 @@ xshmfence_reset(struct xshmfence *f)
int
xshmfence_alloc_shm(void)
{
- char template[] = "/run/shm/shmfd-XXXXXX";
+ char template[] = SHMDIR "/shmfd-XXXXXX";
int fd = mkstemp(template);
if (fd < 0)