summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/Makefile2
-rw-r--r--libavcodec/file_open.c1
-rw-r--r--libavdevice/Makefile2
-rw-r--r--libavdevice/file_open.c1
-rw-r--r--libavformat/Makefile2
-rw-r--r--libavformat/file_open.c1
-rw-r--r--libavutil/internal.h4
7 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index fc1bfb2352..318ed7db2a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -26,6 +26,8 @@ OBJS = allcodecs.o \
raw.o \
utils.o \
+OBJS-$(HAVE_MSVCRT) += file_open.o
+
# parts needed for many different codecs
OBJS-$(CONFIG_AANDCTTABLES) += aandcttab.o
OBJS-$(CONFIG_AC3DSP) += ac3dsp.o
diff --git a/libavcodec/file_open.c b/libavcodec/file_open.c
new file mode 100644
index 0000000000..494a5d37a4
--- /dev/null
+++ b/libavcodec/file_open.c
@@ -0,0 +1 @@
+#include "libavutil/file_open.c"
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index 76d11c1f1c..8fdae2d44e 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -7,6 +7,8 @@ HEADERS = avdevice.h \
OBJS = alldevices.o \
avdevice.o \
+OBJS-$(HAVE_MSVCRT) += file_open.o
+
# input/output devices
OBJS-$(CONFIG_ALSA_INDEV) += alsa-audio-common.o \
alsa-audio-dec.o
diff --git a/libavdevice/file_open.c b/libavdevice/file_open.c
new file mode 100644
index 0000000000..494a5d37a4
--- /dev/null
+++ b/libavdevice/file_open.c
@@ -0,0 +1 @@
+#include "libavutil/file_open.c"
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 5e2dd2a540..0b788c94c4 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -23,6 +23,8 @@ OBJS = allformats.o \
url.o \
utils.o \
+OBJS-$(HAVE_MSVCRT) += file_open.o
+
OBJS-$(CONFIG_NETWORK) += network.o
OBJS-$(CONFIG_RIFFDEC) += riffdec.o
OBJS-$(CONFIG_RIFFENC) += riffenc.o
diff --git a/libavformat/file_open.c b/libavformat/file_open.c
new file mode 100644
index 0000000000..494a5d37a4
--- /dev/null
+++ b/libavformat/file_open.c
@@ -0,0 +1 @@
+#include "libavutil/file_open.c"
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 355a42a7b4..b18860f084 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -196,6 +196,10 @@ void avpriv_report_missing_feature(void *avc,
void avpriv_request_sample(void *avc,
const char *msg, ...) av_printf_format(2, 3);
+#if HAVE_MSVCRT
+#define avpriv_open ff_open
+#endif
+
/**
* A wrapper for open() setting O_CLOEXEC.
*/