gmchess (0.29.6-2) 0003-fix-kfreebsd.patch

Summary

 src/Sound.cc          |    8 +++++---
 src/engine/eleeye.cpp |    8 ++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

    
download this patch

Patch contents

--- a/src/Sound.cc
+++ b/src/Sound.cc
@@ -77,10 +77,12 @@
 void CSound::play_file(const char* filename)
 {
 	gchar* argv[3];
-#ifdef __linux__
-	argv[0] = "aplay";
-#elif __APPLE__
+//#ifdef __linux__
+//	argv[0] = "aplay";
+#ifdef  __APPLE__
 	argv[0] = "afplay";
+#else
+	argv[0] = "aplay";
 #endif
 	argv[1] = (gchar*)filename;
 	argv[2] = NULL;
--- a/src/engine/eleeye.cpp
+++ b/src/engine/eleeye.cpp
@@ -32,13 +32,13 @@
 #ifdef _WIN32
   #include <windows.h>
   const char *const cszLibEvalFile = "EVALUATE.DLL";
-#elif __linux__
-  #include <dlfcn.h>
-  #define WINAPI
-  const char *const cszLibEvalFile = "../lib/libeval.so.0";
 #elif __APPLE__
   #include <dlfcn.h>
   const char *const cszLibEvalFile = "/usr/local/lib/libeval.0.dylib";
+#else //for __linux__ and freebsd
+  #include <dlfcn.h>
+  #define WINAPI
+  const char *const cszLibEvalFile = "../lib/libeval.so.0";
 #endif
 
 const int INTERRUPT_COUNT = 4096; // 搜索若干结点后调用中断