diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO index cc15e9099ab..148abd6eda1 100644 --- a/source4/build/smb_build/TODO +++ b/source4/build/smb_build/TODO @@ -1,4 +1,3 @@ -- replace StrnCpy() with strlcpy() - Add --export-dynamic for each subsystem that has modules - let the build system implement some make functions($(patsubst),$(wildcard),...) and use our own implementations where `make' does not support them - include extra_flags.txt using Makefile construction if diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index e6865d5e60a..8313044bc99 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -323,6 +323,8 @@ sub StaticLibrary($$) { my ($self,$ctx) = @_; + return unless (defined($ctx->{OBJ_FILES})); + push (@{$self->{static_libs}}, $ctx->{TARGET}); $self->output("$ctx->{TYPE}_$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 85c78cf3b46..e6cbcc0036c 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -86,7 +86,11 @@ sub generate_static_library($) push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"); $lib->{TARGET} = "bin/$lib->{LIBRARY_NAME}"; - $lib->{OUTPUT} = "-l".lc($link_name); + if (defined($lib->{OBJ_FILES})) { + $lib->{OUTPUT} = $lib->{TARGET}; + } else { + $lib->{OUTPUT} = ""; + } } sub generate_binary($) diff --git a/source4/lib/socket_wrapper/config.mk b/source4/lib/socket_wrapper/config.mk index baa11b4675f..9e194230dc1 100644 --- a/source4/lib/socket_wrapper/config.mk +++ b/source4/lib/socket_wrapper/config.mk @@ -6,5 +6,6 @@ SO_VERSION = 0 DESCRIPTION = Wrapper library for testing TCP/IP connections using Unix Sockets PUBLIC_HEADERS = socket_wrapper.h OBJ_FILES = socket_wrapper.o +PRIVATE_DEPENDENCIES = EXT_SOCKET # End SUBSYSTEM SOCKET_WRAPPER ############################## diff --git a/source4/lib/util/util_str.c b/source4/lib/util/util_str.c index df9fd44cd6b..ec6a1cbbead 100644 --- a/source4/lib/util/util_str.c +++ b/source4/lib/util/util_str.c @@ -775,8 +775,9 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2) **/ _PUBLIC_ void string_replace(char *s, char oldc, char newc) { - for (;s && *s; s++) { + while (*s) { if (*s == oldc) *s = newc; + s++; } }