FreeBSD expect a real path on the filesystem for shm_open
Patch status: merged
Patch by Baptiste Daroussin
To apply this patch, use:
curl http://cr.i3wm.org/patch/102/raw.patch | git am
b/src/log.c
| 13 |
@@ -107,7 +107,11 @@ void init_logging(void) {
|
| 14 |
sysconf(_SC_PAGESIZE); |
| 15 |
#endif |
| 16 |
logbuffer_size = min(physical_mem_bytes * 0.01, shmlog_size); |
| 17 |
+#if defined(__FreeBSD__) |
| 18 |
+ sasprintf(&shmlogname, "/tmp/i3-log-%d", getpid()); |
| 19 |
+#else |
| 20 |
sasprintf(&shmlogname, "/i3-log-%d", getpid()); |
| 21 |
+#endif |
| 22 |
logbuffer_shm = shm_open(shmlogname, O_RDWR | O_CREAT, S_IREAD | S_IWRITE); |
| 23 |
if (logbuffer_shm == -1) {
|
| 24 |
fprintf(stderr, "Could not shm_open SHM segment for the i3 log: %s\n", strerror(errno)); |