mirror of
https://git.freebsd.org/ports.git
synced 2025-05-17 17:43:11 -04:00
54 lines
1.3 KiB
Text
54 lines
1.3 KiB
Text
--- src/env.c.orig 2013-01-26 10:53:37.000000000 -0800
|
|
+++ src/env.c 2013-01-26 10:20:49.000000000 -0800
|
|
@@ -1,3 +1,7 @@
|
|
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
+#include <sys/param.h>
|
|
+#endif
|
|
+
|
|
#if !defined(MONGO_ENV_STANDARD) && (defined(_WIN32) || defined(_WIN64))
|
|
|
|
/* env_win32.c */
|
|
@@ -34,6 +38,7 @@
|
|
# define NI_MAXSERV 32
|
|
#endif
|
|
|
|
+
|
|
int mongo_env_close_socket( int socket ) {
|
|
return closesocket( socket );
|
|
}
|
|
@@ -179,7 +184,7 @@
|
|
}
|
|
|
|
|
|
-#elif !defined(MONGO_ENV_STANDARD) && (defined(__APPLE__) || defined(__linux) || defined(__unix) || defined(__posix))
|
|
+#elif !defined(MONGO_ENV_STANDARD) && (defined(__APPLE__) || defined(__linux) || defined(__unix) || defined(__posix) || defined(BSD))
|
|
|
|
/* env_posix.c */
|
|
|
|
@@ -227,7 +232,7 @@
|
|
|
|
int mongo_env_write_socket( mongo *conn, const void *buf, size_t len ) {
|
|
const char *cbuf = buf;
|
|
-#ifdef __APPLE__
|
|
+#if defined (__APPLE__) || defined(BSD)
|
|
int flags = 0;
|
|
#else
|
|
int flags = MSG_NOSIGNAL;
|
|
@@ -357,7 +362,7 @@
|
|
conn->sock = 0;
|
|
continue;
|
|
}
|
|
-#if __APPLE__
|
|
+#if __APPLE__
|
|
{
|
|
int flag = 1;
|
|
setsockopt( conn->sock, SOL_SOCKET, SO_NOSIGPIPE,
|
|
@@ -448,7 +453,7 @@
|
|
#ifdef _WIN32
|
|
int flags = 0;
|
|
#else
|
|
-#ifdef __APPLE__
|
|
+#ifdef __APPLE__ || BSD
|
|
int flags = 0;
|
|
#else
|
|
int flags = MSG_NOSIGNAL;
|