freebsd fixes

This commit is contained in:
SJ 2014-07-22 21:10:58 +02:00
parent 537641afd9
commit 6d3d61374c
4 changed files with 21 additions and 7 deletions

9
configure vendored
View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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;