From 6186f49000e6895b03661cd01c3f1c9c5950577a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 20 Oct 2015 03:23:57 +0200 Subject: all: comments only --- opentrack-compat/shm.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'opentrack-compat/shm.cpp') diff --git a/opentrack-compat/shm.cpp b/opentrack-compat/shm.cpp index b18a9933..029a4c95 100644 --- a/opentrack-compat/shm.cpp +++ b/opentrack-compat/shm.cpp @@ -43,10 +43,13 @@ void PortableLockedShm::unlock() (void) ReleaseMutex(hMutex); } #else + +#include + #pragma GCC diagnostic ignored "-Wunused-result" PortableLockedShm::PortableLockedShm(const char *shmName, const char* /*mutexName*/, int mapSize) : size(mapSize) { - char filename[512] = {0}; + char filename[PATH_MAX+2] = {0}; strcpy(filename, "/"); strcat(filename, shmName); fd = shm_open(filename, O_RDWR | O_CREAT, 0600); -- cgit v1.2.3