Ticket #1322: fix-kfreebsd-ftbfs-v4.patch
File fix-kfreebsd-ftbfs-v4.patch, 6.5 KB (added by , 12 years ago) |
---|
-
build/premake/premake4.lua
Description: Fix FTBFS on Debian GNU/kFreeBSD Add defined(__FreeBSD_kernel__) for every instance of a FreeBSD preprocessor directive in order to detect kfreebsd, and avoid linking with execinfo on kfreebsd. Forwarded: http://trac.wildfiregames.com/ticket/1322 Author: Vincent Cheng <Vincentc1208@gmail.com> Last-Update: 2012-04-26
a b 781 781 elseif os.is("bsd") then 782 782 links { 783 783 -- Needed for backtrace* on FreeBSD 784 "execinfo",784 -- "execinfo", 785 785 } 786 786 end 787 787 … … 1012 1012 elseif os.is("bsd") then 1013 1013 -- define BSD-something? 1014 1014 1015 links { 1016 "dl", 1017 } 1018 1015 1019 buildoptions { "-fno-strict-aliasing" } 1016 1020 1017 1021 buildoptions { "-rdynamic" } … … 1183 1187 elseif os.is("bsd") then 1184 1188 links { 1185 1189 -- Needed for backtrace* on FreeBSD 1186 "execinfo",1190 -- "execinfo", 1187 1191 } 1188 1192 end 1189 1193 -
build/premake/premake4/src/host/premake.h
a b 15 15 #if defined(__linux__) 16 16 #define PLATFORM_LINUX (1) 17 17 #define PLATFORM_STRING "linux" 18 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 18 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) 19 19 #define PLATFORM_BSD (1) 20 20 #define PLATFORM_STRING "bsd" 21 21 #elif defined(__APPLE__) && defined(__MACH__) -
source/lib/sysdep/os.h
a b 66 66 # define OS_MACOSX 0 67 67 #endif 68 68 // BSD 69 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 69 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) 70 70 # define OS_BSD 1 71 71 #else 72 72 # define OS_BSD 0 -
libraries/fcollada/src/FCollada/FUtils/FUCriticalSection.h
a b 33 33 #elif defined (__APPLE__) 34 34 //Do something here. 35 35 MPCriticalRegionID criticalSection; 36 #elif defined (LINUX) || defined(__FreeBSD__) 36 #elif defined (LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 37 37 #else 38 38 #warning "FUCriticalSection: Critical section not implemented for other platforms." 39 39 #endif -
libraries/fcollada/src/FCollada/FUtils/Platforms.h
a b 74 74 #include <wchar.h> 75 75 #include <stdint.h> 76 76 #else // __APPLE__ 77 #if defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) 77 #if defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 78 78 #include <ctype.h> 79 79 #include <wctype.h> 80 80 #include <unistd.h> … … 127 127 #endif // PLATFORMS 128 128 129 129 // Important functions that some OSes have missing! 130 #if defined(__APPLE__) || defined (LINUX) || defined (__FreeBSD__)130 #if defined(__APPLE__) || defined (LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 131 131 inline char* strlower(char* str) { char* it = str; while (*it != 0) { *it = tolower(*it); ++it; } return str; } 132 132 inline wchar_t* wcslwr(wchar_t* str) { wchar_t* it = str; while (*it != 0) { *it = towlower(*it); ++it; } return str; } 133 133 inline int wcsicmp(const wchar_t* s1, const wchar_t* s2) { wchar_t c1 = *s1, c2 = *s2; while (c1 != 0 && c2 != 0) { if (c1 >= 'a' && c1 <= 'z') c1 -= 'a' + 'A'; if (c2 >= 'a' && c2 <= 'z') c2 -= 'a' + 'A'; if (c2 < c1) return -1; else if (c2 > c1) return 1; c1 = *(++s1); c2 = *(++s2); } return 0; } -
libraries/fcollada/include/FUtils/FUCriticalSection.h
a b 33 33 #elif defined (__APPLE__) 34 34 //Do something here. 35 35 MPCriticalRegionID criticalSection; 36 #elif defined (LINUX) || defined(__FreeBSD__) 36 #elif defined (LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 37 37 #else 38 38 #warning "FUCriticalSection: Critical section not implemented for other platforms." 39 39 #endif -
libraries/fcollada/include/FUtils/Platforms.h
a b 74 74 #include <wchar.h> 75 75 #include <stdint.h> 76 76 #else // __APPLE__ 77 #if defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) 77 #if defined(LINUX) || defined(__PPU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 78 78 #include <ctype.h> 79 79 #include <wctype.h> 80 80 #include <unistd.h> … … 127 127 #endif // PLATFORMS 128 128 129 129 // Important functions that some OSes have missing! 130 #if defined(__APPLE__) || defined (LINUX) || defined (__FreeBSD__)130 #if defined(__APPLE__) || defined (LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 131 131 inline char* strlower(char* str) { char* it = str; while (*it != 0) { *it = tolower(*it); ++it; } return str; } 132 132 inline wchar_t* wcslwr(wchar_t* str) { wchar_t* it = str; while (*it != 0) { *it = towlower(*it); ++it; } return str; } 133 133 inline int wcsicmp(const wchar_t* s1, const wchar_t* s2) { wchar_t c1 = *s1, c2 = *s2; while (c1 != 0 && c2 != 0) { if (c1 >= 'a' && c1 <= 'z') c1 -= 'a' + 'A'; if (c2 >= 'a' && c2 <= 'z') c2 -= 'a' + 'A'; if (c2 < c1) return -1; else if (c2 > c1) return 1; c1 = *(++s1); c2 = *(++s2); } return 0; } -
libraries/fcollada/src/FCollada/FCDocument/FCDocument.h
a b 30 30 #if defined(WIN32) 31 31 template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */ 32 32 template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */ 33 #elif defined(LINUX) || defined(__APPLE__) || defined (__FreeBSD__)33 #elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 34 34 template <class T> class FCDLibrary; /**< Trick Doxygen. */ 35 35 template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */ 36 36 #endif // LINUX -
libraries/fcollada/include/FCDocument/FCDocument.h
a b 30 30 #if defined(WIN32) 31 31 template <class T> class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */ 32 32 template <class T> class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */ 33 #elif defined(LINUX) || defined(__APPLE__) || defined (__FreeBSD__)33 #elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 34 34 template <class T> class FCDLibrary; /**< Trick Doxygen. */ 35 35 template <class T> class FUUniqueStringMapT; /**< Trick Doxygen. */ 36 36 #endif // LINUX -
source/third_party/mongoose/mongoose.cpp
a b 37 37 38 38 #undef DEBUG 39 39 40 #if defined(__FreeBSD__) 40 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 41 41 // Fix undefined PF_INET on FreeBSD 42 42 #include <sys/socket.h> 43 43 #endif