diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/shm.cpp | 2 | ||||
-rw-r--r-- | compat/shm.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compat/shm.cpp b/compat/shm.cpp index 1f863190..f59469dc 100644 --- a/compat/shm.cpp +++ b/compat/shm.cpp @@ -106,7 +106,7 @@ shm_wrapper::shm_wrapper(const char *shm_name, const char* /*mutex_name*/, int m strcat(filename, shm_name); fd = shm_open(filename, O_RDWR | O_CREAT, 0600); (void) ftruncate(fd, map_size); - mem = mmap(NULL, map_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)0); + mem = mmap(nullptr, map_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)0); } shm_wrapper::~shm_wrapper() diff --git a/compat/shm.h b/compat/shm.h index ece693ea..d1363219 100644 --- a/compat/shm.h +++ b/compat/shm.h @@ -28,7 +28,8 @@ class OTR_COMPAT_EXPORT shm_wrapper final #if defined(_WIN32) HANDLE mutex, mapped_file; #else - int fd, size; + int fd; + unsigned size; #endif public: |