# HG changeset patch # User Vittorio Giovara # Date 1388065731 28800 # Node ID 7c0b35f4b3ae96e2a537c5877e9218bfeef71860 # Parent 8786d4ac9e0b144dfcdc261bc55c51f9d715a502# Parent 8fb7737fbd316d2c05ed8bb96f3423be1fb57766 Merge pull request #5 from AMDmi3/freebsd Fixes required to build hw on freebsd diff -r 8786d4ac9e0b -r 7c0b35f4b3ae QTfrontend/CMakeLists.txt --- a/QTfrontend/CMakeLists.txt Wed Dec 25 08:44:39 2013 -0500 +++ b/QTfrontend/CMakeLists.txt Thu Dec 26 05:48:51 2013 -0800 @@ -61,8 +61,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util/platform) include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDLMIXER_INCLUDE_DIR}) -include_directories(${PHYSFS_INCLUDE_DIR}) -include_directories(${PHYSLAYER_INCLUDE_DIR}) +include_directories(BEFORE ${PHYSFS_INCLUDE_DIR}) +include_directories(BEFORE ${PHYSLAYER_INCLUDE_DIR}) if(UNIX) diff -r 8786d4ac9e0b -r 7c0b35f4b3ae misc/libphysfs/platform_unix.c --- a/misc/libphysfs/platform_unix.c Wed Dec 25 08:44:39 2013 -0500 +++ b/misc/libphysfs/platform_unix.c Thu Dec 26 05:48:51 2013 -0800 @@ -193,7 +193,7 @@ if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */ { - exe[size - binlen] = '\0'; /* chop off filename, leave '/' */ + exe[size - binlen - 1] = '\0'; /* chop off filename, leave '/' */ return exe; } /* if */