← Commit list

e5b1f5af7

Johannes Schindelin
Johannes Schindelin
2017-07-15
SUCCESS Duration: 140s

Subject

copyfd: guard use of munmap() with #if (windows builds need this)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/copyfd.c+3 -0
@@ -119,8 +119,11 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size)
}
out:
+/* some environments don't have munmap(), hide it in #if */
+#if CONFIG_FEATURE_COPYBUF_KB > 4
if (buffer_size > 4 * 1024)
munmap(buffer, buffer_size);
+#endif
return status ? -1 : total;
}