mirror of
https://github.com/monero-project/monero.git
synced 2025-08-15 23:40:28 -04:00
Merge pull request #2644
a17efcb0
make this build on SunOS/Solaris (Pavel Maryanov)
This commit is contained in:
commit
922aaf4e2a
9 changed files with 42 additions and 3 deletions
|
@ -40,6 +40,10 @@
|
|||
#include <byteswap.h>
|
||||
#endif
|
||||
|
||||
#if defined(__sun) && defined(__SVR4)
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -405,7 +405,7 @@ namespace tools
|
|||
#else
|
||||
std::string get_nix_version_display_string()
|
||||
{
|
||||
utsname un;
|
||||
struct utsname un;
|
||||
|
||||
if(uname(&un) < 0)
|
||||
return std::string("*nix: failed to get os version");
|
||||
|
|
|
@ -31,8 +31,13 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__sun) && defined(__SVR4)
|
||||
#define INITIALIZER(name) __attribute__((constructor)) static void name(void)
|
||||
#define FINALIZER(name) __attribute__((destructor)) static void name(void)
|
||||
#else
|
||||
#define INITIALIZER(name) __attribute__((constructor(101))) static void name(void)
|
||||
#define FINALIZER(name) __attribute__((destructor(101))) static void name(void)
|
||||
#endif
|
||||
#define REGISTER_FINALIZER(name) ((void) 0)
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue