diff --git a/plug-ins/common/file-compressor.c b/plug-ins/common/file-compressor.c index 2a4c26a7b0..42ac83ea62 100644 --- a/plug-ins/common/file-compressor.c +++ b/plug-ins/common/file-compressor.c @@ -81,7 +81,6 @@ #ifdef _WIN32 #include #define close _close -#define fileno _fileno #endif #include @@ -1097,7 +1096,11 @@ zip_load (GFile *infile, if (archive_read_next_header (a, &entry) == ARCHIVE_OK) { +#ifndef _WIN32 r = archive_read_data_into_fd (a, fileno (out)); +#else + r = archive_read_data_into_fd (a, _fileno (out)); +#endif if (r != ARCHIVE_OK) { diff --git a/plug-ins/script-fu/libscriptfu/ftx/ftx.c b/plug-ins/script-fu/libscriptfu/ftx/ftx.c index cf77c19e11..b57c297a3f 100644 --- a/plug-ins/script-fu/libscriptfu/ftx/ftx.c +++ b/plug-ins/script-fu/libscriptfu/ftx/ftx.c @@ -15,7 +15,6 @@ #endif #ifdef _WIN32 #include -#define unlink _unlink #endif #include @@ -152,7 +151,11 @@ pointer foreign_filedelete(scheme *sc, pointer args) filename = sc->vptr->string_value(first_arg); filename = g_filename_from_utf8 (filename, -1, NULL, NULL, NULL); +#ifndef _WIN32 retcode = unlink(filename); +#else + retcode = _unlink(filename); +#endif if (retcode == 0) ret = sc->T; else