mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 14:36:37 +00:00
Compile on Freebsd (#1044)
* Compile on Freebsd Small changes needed for compilation on Freebsd. Note that you'll have to pass -DEQEMU_BUILD_ZLIB=OFF on the cmake command line. The bundled zlib-ng does not build on Freebsd even though mainline zlib-ng does. * Fix build errors: typo
This commit is contained in:
@@ -118,6 +118,11 @@ void set_exception_handler() {
|
||||
#include <unistd.h>
|
||||
#include <sys/fcntl.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
void print_trace()
|
||||
{
|
||||
auto uid = geteuid();
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
//I forced this object to become a singleton because it registers its
|
||||
//signal handler for UNIX
|
||||
class ProcLauncher {
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
#include <CoreFoundation/CFUUID.h>
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <uuid.h>
|
||||
#endif
|
||||
|
||||
unsigned char hexDigitToChar(char ch)
|
||||
{
|
||||
if (ch > 47 && ch < 58)
|
||||
@@ -126,6 +130,15 @@ EQ::Util::UUID EQ::Util::UUID::Generate()
|
||||
|
||||
return buffer;
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
uuid_t l_id;
|
||||
char l_uuid[37];
|
||||
uint32_t l_ignored;
|
||||
uuid_create(&l_id, &l_ignored);
|
||||
uuid_to_string(&l_id, (char**) &l_uuid, &l_ignored);
|
||||
return FromString(l_uuid);
|
||||
#endif
|
||||
}
|
||||
|
||||
EQ::Util::UUID EQ::Util::UUID::FromString(const std::string &str)
|
||||
|
||||
Reference in New Issue
Block a user