diff --git a/src/common/util/Jamfile b/src/common/util/Jamfile
index 17da04c76..6d30d656f 100644
--- a/src/common/util/Jamfile
+++ b/src/common/util/Jamfile
@@ -11,6 +11,7 @@ SEARCH_SOURCE +=
SOURCES =
attrib.c
base36.c
+ bsdstring.c
command.c
crmessage.c
cvector.c
@@ -40,8 +41,4 @@ if $(MSPACES) {
SOURCES +=
malloc.c ;
}
-if $(NO_INLINE) {
- SOURCES += bsdstring.c ;
-}
-
Library util : $(SOURCES) ;
diff --git a/src/common/util/bsdstring.c b/src/common/util/bsdstring.c
index e0ccffe0c..ba6670a4e 100644
--- a/src/common/util/bsdstring.c
+++ b/src/common/util/bsdstring.c
@@ -2,6 +2,11 @@
#include
#include "bsdstring.h"
+#ifndef HAVE_INLINE
+# undef INLINE_FUNCTION
+# define INLINE_FUNCTION
+#endif
+
#if !defined(HAVE_STRLCPY)
INLINE_FUNCTION size_t
strlcpy(char *dst, const char *src, size_t siz) /* copied from OpenBSD source code */
diff --git a/src/common/util/bsdstring.h b/src/common/util/bsdstring.h
index 94e511b6c..1f0ce6792 100644
--- a/src/common/util/bsdstring.h
+++ b/src/common/util/bsdstring.h
@@ -1,14 +1,18 @@
#ifndef UTIL_BSDSTRING_H
#define UTIL_BSDSTRING_H
+#ifndef NDEBUG
+# undef HAVE_INLINE
+#endif
+
#if !defined(HAVE_STRLCPY)
# ifdef HAVE_INLINE
# include "bsdstring.c"
+# define HAVE_STRLCPY
# else
extern size_t strlcpy(char *dst, const char *src, size_t siz);
extern size_t strlcat(char * dst, const char * src, size_t siz);
# endif
-# define HAVE_STRLCPY
#endif
#if !defined(HAVE_STRLPRINTF)