Skip to content

Commit

Permalink
Fix to declare missing MAXLOGNAME properly
Browse files Browse the repository at this point in the history
Use LOGIN_NAME_MAX if it is available for the condition.
  • Loading branch information
obache authored and rjbs committed Sep 20, 2024
1 parent c1a4661 commit 9d45f22
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imap/fud.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <netdb.h>
#include <errno.h>
#include <pwd.h>
#include <limits.h>

#include "acl.h"
#include "mboxlist.h"
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 9d45f22

Please sign in to comment.