ports/51622: maintainer-update of mail/mutt-devel

Udo Schweigert udo.schweigert at siemens.com
Wed Apr 30 12:10:16 UTC 2003


>Number:         51622
>Category:       ports
>Synopsis:       maintainer-update of mail/mutt-devel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 30 05:10:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Udo Schweigert
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD alaska.cert.siemens.de 4.8-STABLE FreeBSD 4.8-STABLE #55: Sun Apr 20 10:42:59 CEST 2003 ust at alaska.cert.siemens.de:/usr/obj/work/src/RELENG_4/sys/alaska i386


>Description:

Maintainer update of mail/mutt-devel:

	- Fix handling of hostname if hostname contains more than 32 characters
	  for FreeBSD versions before 5.x

Committer. New file (cvs add) files/patch-init.c

Tested on -stable and 5.0-RELEASE.

>How-To-Repeat:
>Fix:

diff -ru  /usr/ports/mail/mutt-devel/Makefile ./Makefile
--- /usr/ports/mail/mutt-devel/Makefile	Thu Apr 24 11:48:57 2003
+++ ./Makefile	Wed Apr 30 13:17:33 2003
@@ -66,7 +66,7 @@
 
 PORTNAME=	mutt-devel
 PORTVERSION=	1.5.4
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES+=	mail
 .if defined(WITH_MUTT_NNTP)
 CATEGORIES+=	news
diff -ru  /usr/ports/mail/mutt-devel/files/patch-init.c ./files/patch-init.c
--- /usr/ports/mail/mutt-devel/files/patch-init.c	Thu Jan  1 01:00:00 1970
+++ ./files/patch-init.c	Wed Apr 30 13:14:10 2003
@@ -0,0 +1,49 @@
+--- init.c.orig	Wed Jul 24 10:41:29 2002
++++ init.c	Wed Apr 30 13:06:45 2003
+@@ -45,7 +45,9 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#if __FreeBSD_version >= 500000
+ #include <sys/utsname.h>
++#endif
+ #include <errno.h>
+ #include <sys/wait.h>
+ 
+@@ -1707,7 +1709,11 @@
+ void mutt_init (int skip_sys_rc, LIST *commands)
+ {
+   struct passwd *pw;
++#if __FreeBSD_version < 500000
++  char nodename[STRING];
++#else
+   struct utsname utsname;
++#endif
+   char *p, buffer[STRING], error[STRING];
+   int i, default_rc = 0, need_pause = 0;
+   BUFFER err;
+@@ -1765,16 +1771,21 @@
+ #endif
+ 
+   /* And about the host... */
++#if __FreeBSD_version < 500000
++  gethostname(nodename, sizeof (nodename));
++#else
+   uname (&utsname);
++  strfcpy (nodename, utsname.nodename, sizeof (nodename));
++#endif
+   /* some systems report the FQDN instead of just the hostname */
+-  if ((p = strchr (utsname.nodename, '.')))
++  if ((p = strchr (nodename, '.')))
+   {
+-    Hostname = mutt_substrdup (utsname.nodename, p);
++    Hostname = mutt_substrdup (nodename, p);
+     p++;
+     strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */
+   }
+   else
+-    Hostname = safe_strdup (utsname.nodename);
++    Hostname = safe_strdup (nodename);
+ 
+ #ifndef DOMAIN
+ #define DOMAIN buffer
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list