diff options
| -rw-r--r-- | bam.lua | 5 | ||||
| -rw-r--r-- | src/base/detect.h | 4 | ||||
| -rw-r--r-- | src/base/system.c | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/bam.lua b/bam.lua index 5816a26d..46cc18dd 100644 --- a/bam.lua +++ b/bam.lua @@ -159,6 +159,11 @@ function build(settings) else settings.link.libs:Add("pthread") end + + if platform == "solaris" then + settings.link.flags:Add("-lsocket") + settings.link.flags:Add("-lnsl") + end elseif family == "windows" then settings.link.libs:Add("gdi32") settings.link.libs:Add("user32") diff --git a/src/base/detect.h b/src/base/detect.h index f802b119..eb12244c 100644 --- a/src/base/detect.h +++ b/src/base/detect.h @@ -63,7 +63,7 @@ #if defined(__sun) #define CONF_FAMILY_UNIX 1 #define CONF_FAMILY_STRING "unix" - #define CONF_PLATFROM_SOLARIS 1 + #define CONF_PLATFORM_SOLARIS 1 #define CONF_PLATFORM_STRING "solaris" #endif @@ -77,7 +77,7 @@ /* use gcc endianness definitions when available */ -#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__MINGW32__) +#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__MINGW32__) && !defined(__sun) #if defined(__FreeBSD__) || defined(__OpenBSD__) #include <sys/endian.h> #else diff --git a/src/base/system.c b/src/base/system.c index e451cb9a..6dc8cc7d 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -46,6 +46,10 @@ #error NOT IMPLEMENTED #endif +#if defined(CONF_PLATFORM_SOLARIS) + #include <sys/filio.h> +#endif + #if defined(__cplusplus) extern "C" { #endif |