mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 12:36:36 +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:
@@ -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