summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/socket_wrapper/config.m48
-rw-r--r--source3/lib/socket_wrapper/config.mk8
-rw-r--r--source3/lib/socket_wrapper/socket_wrapper.c2
-rw-r--r--source3/lib/socket_wrapper/socket_wrapper.h2
-rw-r--r--source3/lib/socket_wrapper/testsuite.c5
5 files changed, 17 insertions, 8 deletions
diff --git a/source3/lib/socket_wrapper/config.m4 b/source3/lib/socket_wrapper/config.m4
index 42212abc7f..f3ffb895a9 100644
--- a/source3/lib/socket_wrapper/config.m4
+++ b/source3/lib/socket_wrapper/config.m4
@@ -1,22 +1,22 @@
AC_ARG_ENABLE(socket-wrapper,
[ --enable-socket-wrapper Turn on socket wrapper library (default=no)])
-DEFAULT_TEST_TARGET=test-noswrap
+DEFAULT_TEST_OPTIONS=
HAVE_SOCKET_WRAPPER=no
if eval "test x$developer = xyes"; then
enable_socket_wrapper=yes
fi
-
+
if eval "test x$enable_socket_wrapper = xyes"; then
AC_DEFINE(SOCKET_WRAPPER,1,[Use socket wrapper library])
- DEFAULT_TEST_TARGET=test-swrap
+ DEFAULT_TEST_OPTIONS=--socket-wrapper
HAVE_SOCKET_WRAPPER=yes
# this is only used for samba3
SOCKET_WRAPPER_OBJS="lib/socket_wrapper/socket_wrapper.o"
fi
-AC_SUBST(DEFAULT_TEST_TARGET)
+AC_SUBST(DEFAULT_TEST_OPTIONS)
AC_SUBST(HAVE_SOCKET_WRAPPER)
AC_SUBST(SOCKET_WRAPPER_OBJS)
diff --git a/source3/lib/socket_wrapper/config.mk b/source3/lib/socket_wrapper/config.mk
new file mode 100644
index 0000000000..60cfb3209a
--- /dev/null
+++ b/source3/lib/socket_wrapper/config.mk
@@ -0,0 +1,8 @@
+##############################
+# Start SUBSYSTEM SOCKET_WRAPPER
+[SUBSYSTEM::SOCKET_WRAPPER]
+PRIVATE_DEPENDENCIES = LIBREPLACE_NETWORK
+# End SUBSYSTEM SOCKET_WRAPPER
+##############################
+
+SOCKET_WRAPPER_OBJ_FILES = $(socketwrappersrcdir)/socket_wrapper.o
diff --git a/source3/lib/socket_wrapper/socket_wrapper.c b/source3/lib/socket_wrapper/socket_wrapper.c
index d0326be495..5ac9965bd6 100644
--- a/source3/lib/socket_wrapper/socket_wrapper.c
+++ b/source3/lib/socket_wrapper/socket_wrapper.c
@@ -1289,7 +1289,7 @@ _PUBLIC_ int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
return -1;
}
- my_addr = malloc(my_addrlen);
+ my_addr = (struct sockaddr *)malloc(my_addrlen);
if (my_addr == NULL) {
return -1;
}
diff --git a/source3/lib/socket_wrapper/socket_wrapper.h b/source3/lib/socket_wrapper/socket_wrapper.h
index fd1e48610b..cc8b937608 100644
--- a/source3/lib/socket_wrapper/socket_wrapper.h
+++ b/source3/lib/socket_wrapper/socket_wrapper.h
@@ -37,6 +37,7 @@
#define __SOCKET_WRAPPER_H__
const char *socket_wrapper_dir(void);
+unsigned int socket_wrapper_default_iface(void);
int swrap_socket(int family, int type, int protocol);
int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
int swrap_connect(int s, const struct sockaddr *serv_addr, socklen_t addrlen);
@@ -131,4 +132,5 @@ int swrap_close(int);
#define close(s) swrap_close(s)
#endif
+
#endif /* __SOCKET_WRAPPER_H__ */
diff --git a/source3/lib/socket_wrapper/testsuite.c b/source3/lib/socket_wrapper/testsuite.c
index 65ae9a0584..8877418e4c 100644
--- a/source3/lib/socket_wrapper/testsuite.c
+++ b/source3/lib/socket_wrapper/testsuite.c
@@ -7,7 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"