diff --git a/configure b/configure index 292215da..d6cf07c1 100755 --- a/configure +++ b/configure @@ -4629,6 +4629,8 @@ fi if test "$os" = "FreeBSD"; then defs="$defs -DFREEBSD" + antispam_libs="-lz -lm -lcrypto -lssl" + MAKE="gmake" fi if test "$os" = "Linux"; then @@ -4714,7 +4716,12 @@ cat >>confdefs.h <<_ACEOF #define HAVE_LIBWRAP 1 _ACEOF - antispam_libs="$antispam_libs -lwrap -lnsl" + + if test "$os" = "FreeBSD"; then + antispam_libs="$antispam_libs -lwrap" + else + antispam_libs="$antispam_libs -lwrap -lnsl" + fi else echo "tcpwrappers support: no" fi diff --git a/configure.in b/configure.in index 23ae9720..810c9678 100644 --- a/configure.in +++ b/configure.in @@ -356,6 +356,8 @@ dnl let us know if we are building on FreeBSD if test "$os" = "FreeBSD"; then defs="$defs -DFREEBSD" + antispam_libs="-lz -lm -lcrypto -lssl" + MAKE="gmake" fi if test "$os" = "Linux"; then @@ -424,7 +426,12 @@ fi if test "$have_tcpwrappers" = "yes"; then echo "tcpwrappers support: yes" AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, 1, [tcpwrappers support]) - antispam_libs="$antispam_libs -lwrap -lnsl" + + if test "$os" = "FreeBSD"; then + antispam_libs="$antispam_libs -lwrap" + else + antispam_libs="$antispam_libs -lwrap -lnsl" + fi else echo "tcpwrappers support: no" fi diff --git a/test/import.c b/test/import.c index 00a3aef8..a655c98c 100644 --- a/test/import.c +++ b/test/import.c @@ -130,7 +130,7 @@ int import_from_maildir(char *directory, struct session_data *sdata, struct __da int import_from_imap_server(char *imapserver, char *username, char *password, struct session_data *sdata, struct __data *data, struct __config *cfg){ - int rc=ERR, ret=OK, sd, seq=1; + int rc=ERR, ret=OK, sd, seq=1, result; char *p, puf[MAXBUFSIZE]; char folders[MAXBUFSIZE]; @@ -151,7 +151,7 @@ int import_from_imap_server(char *imapserver, char *username, char *password, st p = &folders[0]; do { memset(puf, 0, sizeof(puf)); - p = split(p, '\n', puf, sizeof(puf)-1); + p = split(p, '\n', puf, sizeof(puf)-1, &result); printf("processing folder: %s... ", puf); diff --git a/test/ptest.c b/test/ptest.c index 438d748f..39613877 100644 --- a/test/ptest.c +++ b/test/ptest.c @@ -229,7 +229,7 @@ int import_from_maildir(char *directory, struct session_data *sdata, struct __da int import_from_imap_server(char *imapserver, char *username, char *password, struct session_data *sdata, struct __data *data, char *skiplist, struct __config *cfg){ - int rc=ERR, ret=OK, sd, seq=1, skipmatch; + int rc=ERR, ret=OK, sd, seq=1, skipmatch, result; char *p, puf[SMALLBUFSIZE]; char *q, muf[SMALLBUFSIZE]; char folders[MAXBUFSIZE]; @@ -251,7 +251,7 @@ int import_from_imap_server(char *imapserver, char *username, char *password, st p = &folders[0]; do { memset(puf, 0, sizeof(puf)); - p = split(p, '\n', puf, sizeof(puf)-1); + p = split(p, '\n', puf, sizeof(puf)-1, &result); if(strlen(puf) < 1) continue; @@ -261,7 +261,7 @@ int import_from_imap_server(char *imapserver, char *username, char *password, st q = skiplist; do { memset(muf, 0, sizeof(muf)); - q = split(q, ',', muf, sizeof(muf)-1); + q = split(q, ',', muf, sizeof(muf)-1, &result); if(strncasecmp(puf, muf, strlen(muf)) == 0){ skipmatch = 1; break;