diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-20 03:23:57 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-20 03:23:57 +0200 |
commit | 6186f49000e6895b03661cd01c3f1c9c5950577a (patch) | |
tree | 2353488ae6eb4de89c35b8d0b7effe82c7ba2522 /opentrack-compat/shm.cpp | |
parent | f1e71e68512bc58f3f41ba4566f9d1574773d742 (diff) |
all: comments only
Diffstat (limited to 'opentrack-compat/shm.cpp')
-rw-r--r-- | opentrack-compat/shm.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 <limits.h> + #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); |