Check for and use chsize instead of ftruncate if present.
diff --git a/include/config.h.in b/include/config.h.in index 4f1b63e..12f6cd8 100644 --- a/include/config.h.in +++ b/include/config.h.in
@@ -32,6 +32,9 @@ /* Define to use .string instead of .ascii */ #undef HAVE_ASM_STRING +/* Define to 1 if you have the `chsize' function. */ +#undef HAVE_CHSIZE + /* Define to 1 if you have the `clone' function. */ #undef HAVE_CLONE @@ -101,6 +104,9 @@ /* Define to 1 if you have the <freetype/tttables.h> header file. */ #undef HAVE_FREETYPE_TTTABLES_H +/* Define to 1 if you have the `ftruncate' function. */ +#undef HAVE_FTRUNCATE + /* Define to 1 if you have the `ftruncate64' function. */ #undef HAVE_FTRUNCATE64
diff --git a/include/wine/port.h b/include/wine/port.h index c161d22..d5065a4 100644 --- a/include/wine/port.h +++ b/include/wine/port.h
@@ -104,6 +104,10 @@ #define RTLD_GLOBAL 0x100 #endif +#if !defined(HAVE_FTRUNCATE) && defined(HAVE_CHSIZE) +#define ftruncate chsize +#endif + #if !defined(HAVE_POPEN) && defined(HAVE__POPEN) #define popen _popen #endif