From b7c8cacddf7ce3ae11269f3ea6b2e91eb38ac46d Mon Sep 17 00:00:00 2001 From: casey langen Date: Fri, 10 Jun 2016 22:20:42 -0700 Subject: [PATCH] Fixed compile on 64-bit Ubuntu --- src/contrib/alsaout/AlsaOut.cpp | 2 +- src/contrib/taglib_plugin/taglib-1.11/CMakeLists.txt | 2 ++ src/musikbox/cursespp/MessageQueue.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/contrib/alsaout/AlsaOut.cpp b/src/contrib/alsaout/AlsaOut.cpp index 7cc021e2f..9e0169580 100755 --- a/src/contrib/alsaout/AlsaOut.cpp +++ b/src/contrib/alsaout/AlsaOut.cpp @@ -86,7 +86,7 @@ AlsaOut::~AlsaOut() { void AlsaOut::InitDevice() { int err, dir; - size_t rate = this->rate; + unsigned int rate = (unsigned int) this->rate; if ((err = snd_pcm_open(&this->pcmHandle, this->device.c_str(), SND_PCM_STREAM_PLAYBACK, 0)) < 0) { std::cerr << "AlsaOut: cannot open audio device 'default' :" << snd_strerror(err) << std::endl; diff --git a/src/contrib/taglib_plugin/taglib-1.11/CMakeLists.txt b/src/contrib/taglib_plugin/taglib-1.11/CMakeLists.txt index 298ee7e37..94365d34d 100755 --- a/src/contrib/taglib_plugin/taglib-1.11/CMakeLists.txt +++ b/src/contrib/taglib_plugin/taglib-1.11/CMakeLists.txt @@ -56,6 +56,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") endif() + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") if(MSVC AND ENABLE_STATIC_RUNTIME) foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) diff --git a/src/musikbox/cursespp/MessageQueue.cpp b/src/musikbox/cursespp/MessageQueue.cpp index 653e63ab2..41b532bc4 100755 --- a/src/musikbox/cursespp/MessageQueue.cpp +++ b/src/musikbox/cursespp/MessageQueue.cpp @@ -82,7 +82,7 @@ void MessageQueue::Remove(IMessageTarget *target, int type) { void MessageQueue::Post(IMessagePtr message, int64 delayMs) { boost::recursive_mutex::scoped_lock lock(this->queueMutex); - delayMs = std::max(0LL, delayMs); + delayMs = std::max((int64) 0, delayMs); milliseconds now = duration_cast( system_clock::now().time_since_epoch());