Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-08-06 20:45:51 +0000
committerStijn Buys <ingar@osirion.org>2011-08-06 20:45:51 +0000
commitabcf75a5abb45e44364b7b0205fe3f43d3692d6e (patch)
tree7f428c596e449738acdecfb55a689c66f6c39506
parent082d19ef5d265379c82b2b403cbe6af18fb9064f (diff)
Workaround for a vorbisfile compile problem on Ubuntu 10.
-rw-r--r--src/audio/vorbisfile.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/audio/vorbisfile.cc b/src/audio/vorbisfile.cc
index 74df9b0..96fbe82 100644
--- a/src/audio/vorbisfile.cc
+++ b/src/audio/vorbisfile.cc
@@ -42,7 +42,10 @@ PCM *Vorbis::load(std::string const & filename)
filesystem::close(fs_file);
OggVorbis_File vorbis_file;
- if (ov_fopen(vorbis_path.c_str(), &vorbis_file) < 0 ) {
+ // workaround for Ubuntu 10: ov_fopen parameter 1 is char * instead of const char *
+ char tmpstr[vorbis_path.size()+1];
+ ::strncpy((char *)tmpstr, vorbis_path.c_str(), vorbis_path.size());
+ if (ov_fopen(tmpstr, &vorbis_file) < 0 ) {
return 0;
}