From abcf75a5abb45e44364b7b0205fe3f43d3692d6e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 6 Aug 2011 20:45:51 +0000 Subject: Workaround for a vorbisfile compile problem on Ubuntu 10. --- src/audio/vorbisfile.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/audio') 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; } -- cgit v1.2.3