NetBSD Problem Report #28543

From mw@nosflow.com  Sun Dec  5 20:19:54 2004
Return-Path: <mw@nosflow.com>
Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55])
	by narn.netbsd.org (Postfix) with ESMTP id 9383C251EAB
	for <gnats-bugs@gnats.netbsd.org>; Sun,  5 Dec 2004 20:19:53 +0000 (UTC)
Message-Id: <20041205201928.149B8F7F@sbd.nosflow.com>
Date: Sun,  5 Dec 2004 12:19:28 -0800 (PST)
From: michael@nosflow.com
Reply-To: michael@nosflow.com
To: gnats-bugs@netbsd.org
Subject: mail/fetchmail doesn't compile on Darwin
X-Send-Pr-Version: 3.95

>Number:         28543
>Category:       pkg
>Synopsis:       mail/fetchmail doesn't compile on Darwin
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    darwin-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 05 20:21:00 +0000 2004
>Closed-Date:    Fri Oct 21 21:04:37 +0000 2005
>Last-Modified:  Tue Nov 01 21:52:01 +0000 2005
>Originator:     michael@nosflow.com
>Release:        Darwin 7.6.0
>Organization:
>Environment:
Darwin GizmMac-ether.nosflow.com 7.6.0 Darwin Kernel Version 7.6.0: Sun 
Oct 10 12:05:27 PDT 2004; root:xnu/xnu-517.9.4.obj~1/RELEASE_PPC  Power 
Macintosh powerpc
Architecture: ppc
Machine: macppc
>Description:
Fails to compile:
gcc -pipe -DHAVE_CONFIG_H  -DLOCALEDIR=\"/usr/pkg/share/locale\" -c  -I. -I. -I./intl -I./intl -I/usr/include -I/usr/kerberos/include -O2 -I/usr/include -I/usr/pkg/include etrn.c
gcc -pipe -DHAVE_CONFIG_H  -DLOCALEDIR=\"/usr/pkg/share/locale\" -c  -I. -I. -I./intl -I./intl -I/usr/include -I/usr/kerberos/include -O2 -I/usr/include -I/usr/pkg/include odmr.c
In file included from odmr.c:30:
fetchmail.h:465: error: conflicting types for `lock_release'
/usr/include/mach/lock_set.h:67: error: previous declaration of `lock_release'
*** Error code 1

Stop.
bmake: stopped in 
/Volumes/NetBSD/usr/src/pkgsrc/mail/fetchmail/work/fetchmail-6.2.5

>How-To-Repeat:
cd mail/fetchmail;make
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->darwin-pkg-people
Responsible-Changed-By: cube@netbsd.org
Responsible-Changed-When: Mon, 06 Dec 2004 21:37:51 +0000
Responsible-Changed-Why:
Darwin-specific PR.


From: S <scole@sdf.lonestar.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/28543
Date: Sat, 25 Jun 2005 13:20:06 GMT

 My apology if this was received twice; my first attempt at sending
 didn't seem to make it.
 **********************
 >Suggested-Fix:
 There seems to be a namespace collision between darwin lock functions
 and fetchmail's, so I renamed the fetchmail's lock functions to start
 with fm_.  Also, fetchmail needs to link against -lresolv on darwin.
 These changes worked for me but maybe there is another standard way to
 do this with pkgsrc.

 I tested these patches against fetchmail-6.2.5nb4 and

 Darwin goofy 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17
 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc

 -----------------------------------
 pkgsrc/mail/fetchmail/Makefile
 --- Makefile.orig       Fri Jun 17 22:08:55 2005
 +++ Makefile    Fri Jun 17 22:00:56 2005
 @@ -23,6 +23,11 @@
  LDFLAGS+=              ${CFLAGS}
  USE_TOOLS+=            tbl

 +.if ${OPSYS} == "Darwin"
 +LDFLAGS+=      -lresolv
 +CFLAGS.Darwin+=  -DBIND_8_COMPAT -DHAVE_RESOLV_H
 +.endif
 +
  .include "options.mk"

  DOCDIR=                ${PREFIX}/share/doc/fetchmail
 -----------------------------------
 --- fetchmail.c.orig    Fri Jun 17 22:12:48 2005
 +++ fetchmail.c Fri Jun 17 21:03:23 2005
 @@ -172,7 +172,7 @@
       * call near the beginning of the polling loop for details).  We want
       * to be sure the lock gets nuked on any error exit, basically.
       */
 -    lock_dispose();
 +    fm_lock_dispose();

  #ifdef HAVE_GETCWD
      /* save the current directory */
 @@ -268,7 +268,7 @@
         report_init((run.poll_interval == 0 || nodetach) && !run.logfile);

      /* construct the lockfile */
 -    lock_setup();
 +    fm_lock_setup();

  #ifdef HAVE_SETRLIMIT
      /*
 @@ -349,7 +349,7 @@
      }

      /* check for another fetchmail running concurrently */
 -    pid = lock_state();
 +    pid = fm_lock_state();
      bkgd = (pid < 0);
      pid = bkgd ? -pid : pid;

 @@ -387,7 +387,7 @@
         {
             fprintf(stderr,GT_("fetchmail: %s fetchmail at %d killed.\n"),
                     bkgd ? GT_("background") : GT_("foreground"), pid);
 -           lock_release();
 +           fm_lock_release();
             if (argc == 2)
                 exit(0);
             else
 @@ -420,7 +420,7 @@
         }
         else if (getpid() == pid)
             /* this test enables re-execing on a changed rcfile */
 -           lock_assert();
 +           fm_lock_assert();
         else if (argc > 1)
         {
             fprintf(stderr,
 @@ -529,7 +529,7 @@
      set_signal_handler(SIGQUIT, terminate_run);

      /* here's the exclusion lock */
 -    lock_or_die();
 +    fm_lock_or_die();

      /*
       * Query all hosts. If there's only one, the error return will
 @@ -1300,7 +1300,7 @@
           memset(ctl->password, '\0', strlen(ctl->password));

  #if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT)
 -    lock_release();
 +    fm_lock_release();
  #endif

      if (activecount == 0)
 -----------------------------------
 --- fetchmail.h.orig    Fri Jun 17 22:12:38 2005
 +++ fetchmail.h Fri Jun 17 21:57:06 2005
 @@ -461,10 +461,10 @@
  extern struct msgblk msgblk;

  /* lock.c: concurrency locking */
 -void lock_setup(void), lock_assert(void);
 -void lock_or_die(void), lock_release(void);
 -int lock_state(void);
 -void lock_dispose(void);
 +void fm_lock_setup(void), fm_lock_assert(void);
 +void fm_lock_or_die(void), fm_lock_release(void);
 +int fm_lock_state(void);
 +void fm_lock_dispose(void);

  /* use these to track what was happening when the nonresponse timer fired */
  #define GENERAL_WAIT   0       /* unknown wait type */
 -----------------------------------
 --- lock.c.orig Fri Jun 17 22:13:03 2005
 +++ lock.c      Fri Jun 17 21:03:14 2005
 @@ -24,7 +24,7 @@
  static char *lockfile;         /* name of lockfile */
  static int lock_acquired;      /* have we acquired a lock */

 -void lock_setup(void)
 +void fm_lock_setup(void)
  /* set up the global lockfile name */
  {
      /* set up to do lock protocol */
 @@ -55,7 +55,7 @@
         unlink(lockfile);
  }

 -void lock_dispose(void)
 +void fm_lock_dispose(void)
  /* arrange for a lock to be removed on process exit */
  {
  #ifdef HAVE_ATEXIT
 @@ -66,7 +66,7 @@
  #endif
  }

 -int lock_state(void)
 +int fm_lock_state(void)
  {
      int        pid, st;
      FILE       *lockfp;
 @@ -88,13 +88,13 @@
      return(bkgd ? -pid : pid);
  }

 -void lock_assert(void)
 +void fm_lock_assert(void)
  /* assert that we already posess a lock */
  {
      lock_acquired = TRUE;
  }

 -void lock_or_die(void)
 +void fm_lock_or_die(void)
  /* get a lock on a given host or exit */
  {
      int fd;
 @@ -125,7 +125,7 @@
      }
  }

 -void lock_release(void)
 +void fm_lock_release(void)
  /* release a lock on a given host */
  {
      unlink(lockfile);
 -----------------------------------

From: Antoine Reilles <tonio@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28543 CVS commit: pkgsrc/mail/fetchmail
Date: Fri, 21 Oct 2005 20:56:50 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tonio
 Date:		Fri Oct 21 20:56:50 UTC 2005

 Modified Files:
 	pkgsrc/mail/fetchmail: Makefile distinfo
 Added Files:
 	pkgsrc/mail/fetchmail/patches: patch-ah patch-ai patch-aj

 Log Message:
 Fix mail/fetchmail under darwin (PR 28543).
 The added patches add a prefix "fm_" to lock related finctions, to avoid name
 clash with darwin lock functions. Link with -lresolv under darwin.
 (thanks scole_at_sdf.lonestar.org for the patches)
 Bump PKGREVISION


 To generate a diff of this commit:
 cvs rdiff -r1.153 -r1.154 pkgsrc/mail/fetchmail/Makefile
 cvs rdiff -r1.31 -r1.32 pkgsrc/mail/fetchmail/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/mail/fetchmail/patches/patch-ah \
     pkgsrc/mail/fetchmail/patches/patch-ai \
     pkgsrc/mail/fetchmail/patches/patch-aj

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Antoine Reilles <tonio@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28543 CVS commit: pkgsrc/doc
Date: Fri, 21 Oct 2005 21:00:21 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tonio
 Date:		Fri Oct 21 21:00:21 UTC 2005

 Modified Files:
 	pkgsrc/doc: CHANGES

 Log Message:
 Update mail/fetchmail to 6.2.5nb6
 Fix PR 28543, build under darwin.


 To generate a diff of this commit:
 cvs rdiff -r1.11603 -r1.11604 pkgsrc/doc/CHANGES

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: tonio@netbsd.org
State-Changed-When: Fri, 21 Oct 2005 21:04:37 +0000
State-Changed-Why:
Patch applied. Thanks for the PR !


From: Lubomir Sedlacik <salo@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28543 CVS commit: [pkgsrc-2005Q3] pkgsrc/mail
Date: Tue,  1 Nov 2005 21:51:26 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	salo
 Date:		Tue Nov  1 21:51:26 UTC 2005

 Modified Files:
 	pkgsrc/mail/fetchmail [pkgsrc-2005Q3]: Makefile distinfo options.mk
 	pkgsrc/mail/fetchmailconf [pkgsrc-2005Q3]: Makefile
 Added Files:
 	pkgsrc/mail/fetchmail/patches [pkgsrc-2005Q3]: patch-ah patch-ai
 	    patch-aj patch-ak

 Log Message:
 Pullup ticket 877 - requested by Adrian Portelli
 security fix for fetchmailconf, portability fixes for fetchmail

 Revisions pulled up:
 - pkgsrc/mail/fetchmail/Makefile		1.154
 - pkgsrc/mail/fetchmail/distinfo		1.32, 1.33
 - pkgsrc/mail/fetchmail/options.mk		1.12, 1.13
 - pkgsrc/mail/fetchmail/patches/patch-ah	1.1
 - pkgsrc/mail/fetchmail/patches/patch-ai	1.1
 - pkgsrc/mail/fetchmail/patches/patch-aj	1.1
 - pkgsrc/mail/fetchmail/patches/patch-ak	1.1
 - pkgsrc/mail/fetchmailconf/Makefile		1.65

    Module Name:		pkgsrc
    Committed By:	rillig
    Date:		Wed Sep 28 21:55:32 UTC 2005

    Modified Files:
    	pkgsrc/mail/fetchmail: options.mk

    Log Message:
    Replaced "# defined" with "yes" in Makefile variables like GNU_CONFIGURE,
    NO_BUILD, USE_LIBTOOL.
 ---
    Module Name:		pkgsrc
    Committed By:	scottr
    Date:		Tue Oct 25 17:52:38 UTC 2005

    Modified Files:
    	pkgsrc/mail/fetchmail: options.mk

    Log Message:
    Add SOCKS4/SOCKS5 support.
 ---
    Module Name:		pkgsrc
    Committed By:	tonio
    Date:		Fri Oct 21 20:56:50 UTC 2005

    Modified Files:
    	pkgsrc/mail/fetchmail: Makefile distinfo
    Added Files:
    	pkgsrc/mail/fetchmail/patches: patch-ah patch-ai patch-aj

    Log Message:
    Fix mail/fetchmail under darwin (PR 28543).
    The added patches add a prefix "fm_" to lock related finctions, to avoid
    name clash with darwin lock functions. Link with -lresolv under darwin.
    (thanks scole_at_sdf.lonestar.org for the patches)
    Bump PKGREVISION
 ---
    Module Name:		pkgsrc
    Committed By:	adrianp
    Date:		Tue Nov  1 19:16:52 UTC 2005

    Modified Files:
    	pkgsrc/mail/fetchmail: distinfo
    Added Files:
    	pkgsrc/mail/fetchmail/patches: patch-ak

    Log Message:
    Add patch-ak for a fetchmailconf security issue.  This patch does
    not impact the fetchmail package so no version bump is required.
 ---
    Module Name:		pkgsrc
    Committed By:	adrianp
    Date:		Tue Nov  1 19:17:41 UTC 2005

    Modified Files:
    	pkgsrc/mail/fetchmailconf: Makefile

    Log Message:
    Bump to nb3 for security patch


 To generate a diff of this commit:
 cvs rdiff -r1.153 -r1.153.2.1 pkgsrc/mail/fetchmail/Makefile
 cvs rdiff -r1.31 -r1.31.2.1 pkgsrc/mail/fetchmail/distinfo
 cvs rdiff -r1.11 -r1.11.4.1 pkgsrc/mail/fetchmail/options.mk
 cvs rdiff -r0 -r1.1.2.1 pkgsrc/mail/fetchmail/patches/patch-ah \
     pkgsrc/mail/fetchmail/patches/patch-ai \
     pkgsrc/mail/fetchmail/patches/patch-aj \
     pkgsrc/mail/fetchmail/patches/patch-ak
 cvs rdiff -r1.64 -r1.64.4.1 pkgsrc/mail/fetchmailconf/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.