solaris fixes

This commit is contained in:
roberto@openindiana
2012-03-06 12:19:29 +01:00
parent adca811941
commit 8a303b1965
3 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
extern struct uwsgi_server uwsgi;
#ifdef __linux__
#if defined(__linux__) || defined(__sun__)
ssize_t sctp_sendv(int s, struct iovec *iov, size_t iov_len,
const struct sctp_sndrcvinfo *sinfo, int flags)
{
+8
View File
@@ -215,7 +215,15 @@ int connect_to_sctp(char *socket_names, int queue) {
goto clear;
}
// solaris has no sctp_connectx support
#ifdef __sun__
if (addresses > 1) {
uwsgi_log("*** You will only connect to the first specified SCTP address !!! ***\n");
}
if (connect(serverfd, (struct sockaddr *) sins, sizeof(struct sockaddr_in))) {
#else
if (sctp_connectx(serverfd, (struct sockaddr *) sins, addresses, NULL)) {
#endif
uwsgi_error("sctp_connectx()");
close(serverfd);
goto clear;
+3
View File
@@ -184,6 +184,9 @@ extern int pivot_root(const char *new_root, const char *put_old);
#ifdef UWSGI_SCTP
#include <netinet/sctp.h>
#ifndef SOL_SCTP
#define SOL_SCTP IPPROTO_SCTP
#endif
#endif
#ifndef UWSGI_PLUGIN_BASE