avformat/file: enable file_move() without unistd.h
authorRaymond Hilseth <rhi@vizrt.com>
Wed, 6 Jan 2016 08:57:41 +0000 (09:57 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 28 Feb 2016 21:26:39 +0000 (22:26 +0100)
it only requires the rename function from os_support.h.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/file.c

index 595ba36..4812ad1 100644 (file)
@@ -176,7 +176,6 @@ static int file_delete(URLContext *h)
 
 static int file_move(URLContext *h_src, URLContext *h_dst)
 {
-#if HAVE_UNISTD_H
     const char *filename_src = h_src->filename;
     const char *filename_dst = h_dst->filename;
     av_strstart(filename_src, "file:", &filename_src);
@@ -186,9 +185,6 @@ static int file_move(URLContext *h_src, URLContext *h_dst)
         return AVERROR(errno);
 
     return 0;
-#else
-    return AVERROR(ENOSYS);
-#endif /* HAVE_UNISTD_H */
 }
 
 #if CONFIG_FILE_PROTOCOL