diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-08 03:45:43 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-08 03:54:30 +0400 |
commit | 0ebcf878032fa32a02e406a3397b51dc8b45109d (patch) | |
tree | 3d668f67a461aaf3494030c942d17a19cad75db0 /libavutil | |
parent | 5b58692ed4a711d431e0073d6853cf8210ebb5a6 (diff) |
protect unistd.h with #if HAVE_UNISTD_H in code from recent av_bprint_fd_contents() patches
Should fix build failure on MSVC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/bprint.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavutil/bprint.c b/libavutil/bprint.c index becb4d8013..4fd902ef74 100644 --- a/libavutil/bprint.c +++ b/libavutil/bprint.c @@ -22,7 +22,6 @@ #include <stdio.h> #include <string.h> #include <time.h> -#include <unistd.h> #include "avassert.h" #include "avstring.h" #include "bprint.h" @@ -31,6 +30,11 @@ #include "error.h" #include "mem.h" +#if HAVE_UNISTD_H +#include <unistd.h> +#endif + + #define av_bprint_room(buf) ((buf)->size - FFMIN((buf)->len, (buf)->size)) #define av_bprint_is_allocated(buf) ((buf)->str != (buf)->reserved_internal_buffer) |