diff --git a/imap/fud.c b/imap/fud.c index 2d3489f4c5..6cd7e3cd08 100644 --- a/imap/fud.c +++ b/imap/fud.c @@ -60,6 +60,7 @@ #include #include #include +#include #include "acl.h" #include "mboxlist.h" @@ -97,7 +98,11 @@ static void send_reply(struct sockaddr *sfrom, socklen_t sfromsiz, int status, static int soc = 0; /* inetd (master) has handed us the port as stdin */ #ifndef MAXLOGNAME +# ifdef LOGIN_NAME_MAX +#define MAXLOGNAME (LOGIN_NAME_MAX - 1) +# else #define MAXLOGNAME 16 /* should find out for real */ +# endif #endif #ifndef MAXDOMNAME #define MAXDOMNAME 20 /* should find out for real */