input: avoid ftruncate alltogether under cygwin
@@ -56,14 +56,13 @@ void input_setSize(run_t* run, size_t sz) {
if (sz > run->global->mutate.maxFileSz) {
PLOG_F("Too large size requested: %zu > maxSize: %zu", sz, run->global->mutate.maxFileSz);
}
+#if !defined(__CYGWIN__)
+ /* ftruncate of a mmaped file fails under CygWin */
if (TEMP_FAILURE_RETRY(ftruncate(run->dynamicFileFd, sz)) == -1) {
- /* This fails under CygWin. Make it debug-only */
-#if defined(__CYGWIN__)
PLOG_D("ftruncate(run->dynamicFileFd=%d, sz=%zu)", run->dynamicFileFd, sz);
-#else /* defined(__CYGWIN__) */
PLOG_W("ftruncate(run->dynamicFileFd=%d, sz=%zu)", run->dynamicFileFd, sz);
-#endif /* defined(__CYGWIN__) */
}
+#endif /* !defined(__CYGWIN__) */
run->dynamicFileSz = sz;
}
