]> git.sur5r.net Git - i3/i3/blobdiff - src/log.c
Send IPC window events for focus and title changes
[i3/i3] / src / log.c
index 86f47b9acfa7c3c77362d587fce4cc73bfa8579b..ec44f3ae963804fada28edff9ead570837ba6e05 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -129,7 +129,7 @@ void open_logbuffer(void) {
             return;
         }
 
-#if defined(__APPLE__)
+#if defined(__OpenBSD__) || defined(__APPLE__)
         if (ftruncate(logbuffer_shm, logbuffer_size) == -1) {
             fprintf(stderr, "Could not ftruncate SHM segment for the i3 log: %s\n", strerror(errno));
 #else
@@ -250,7 +250,7 @@ static void vlog(const bool print, const char *fmt, va_list args) {
 
         /* If there is no space for the current message in the ringbuffer, we
          * need to wrap and write to the beginning again. */
-        if (len >= (logbuffer_size - (logwalk - logbuffer))) {
+        if (len >= (size_t)(logbuffer_size - (logwalk - logbuffer))) {
             loglastwrap = logwalk;
             logwalk = logbuffer + sizeof(i3_shmlog_header);
             store_log_markers();