Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@thaumas.net>2011-08-02 04:10:00 +0400
committerRalph Giles <giles@thaumas.net>2011-08-02 20:45:04 +0400
commit42eb9330c9a5f63b4f005e3a26b4fe3323e72736 (patch)
tree09ae720ec96d13ea1610fe2029749bc628cd1472 /src/opus.c
parent71fe1f453c801bb9b9fe1b557606bd13f7c817f3 (diff)
Define a fallback version string.
The new opus_get_version_string() call just returns a static string defined by OPUS_VERSION, which is passed in from the build system through config.h (or a custom compile line). Provide a fallback to "unknown" if the build system fails to actually provide that definition. This restores compilation with Makefile.draft. In general, this means there will be builds out there with non-specific version strings, since ports won't be forced to update the string. While that's unfortunate, I think it's more valuable that the library be simple to build.
Diffstat (limited to 'src/opus.c')
-rw-r--r--src/opus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opus.c b/src/opus.c
index 419918b0..55e76d93 100644
--- a/src/opus.c
+++ b/src/opus.c
@@ -31,6 +31,10 @@
#include "opus.h"
+#ifndef OPUS_VERSION
+#define OPUS_VERSION "Opus version unknown"
+#endif
+
const char *opus_strerror(int error)
{
static const char *error_strings[8] = {