summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure4
-rw-r--r--libavutil/internal.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/configure b/configure
index dabe308735..fbb01c9b81 100755
--- a/configure
+++ b/configure
@@ -4623,10 +4623,6 @@ fi
enabled getenv || echo "#define getenv(x) NULL" >> $TMPH
-if enabled msvc && ! enabled shared; then
- echo '#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod")' >> $TMPH
- echo '#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf")' >> $TMPH
-fi
mkdir -p doc
echo "@c auto-generated by configure" > doc/config.texi
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 6ff14facb5..76018a8a2f 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -112,6 +112,11 @@
#include "libm.h"
+#if defined(_MSC_VER) && !CONFIG_SHARED
+#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod")
+#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf")
+#endif
+
/**
* Return NULL if CONFIG_SMALL is true, otherwise the argument
* without modification. Used to disable the definition of strings