Revision: 9115 http://sourceforge.net/p/playerstage/svn/9115 Author: jpgr87 Date: 2013-01-05 21:41:59 +0000 (Sat, 05 Jan 2013) Log Message: ----------- Fix compilation on clang
Clang doesn't accept assigning the pthread initializer value to a pthread mutex after it is created. This resets the mutex using memset instead. Modified Paths: -------------- code/player/trunk/server/drivers/camera/kinect/kinectdriver.cc Modified: code/player/trunk/server/drivers/camera/kinect/kinectdriver.cc =================================================================== --- code/player/trunk/server/drivers/camera/kinect/kinectdriver.cc 2013-01-05 21:28:17 UTC (rev 9114) +++ code/player/trunk/server/drivers/camera/kinect/kinectdriver.cc 2013-01-05 21:41:59 UTC (rev 9115) @@ -123,7 +123,7 @@ // Storage for image data and metadata static uint16_t* DepthImage; static uint8_t* ColorImage; -static pthread_mutex_t kinect_mutex; +pthread_mutex_t kinect_mutex = PTHREAD_MUTEX_INITIALIZER; static int newcdata, newddata; static freenect_frame_mode colorImageMode; static freenect_frame_mode depthImageMode; @@ -304,7 +304,7 @@ int KinectDriver::MainSetup() { PLAYER_MSG0(1,"Kinect driver initializing..."); - kinect_mutex = PTHREAD_MUTEX_INITIALIZER; + memset(&kinect_mutex, 0, sizeof(pthread_mutex_t)); if (freenect_init(&fctx, NULL) < 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit