pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/38240: pkgtools/pkg_install-20080313 fails to compile - missing getopt?



The following reply was made to PR pkg/38240; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: srcshelton%gmail.com@localhost
Subject: Re: pkg/38240: pkgtools/pkg_install-20080313 fails to compile -
        missing getopt?
Date: Wed, 19 Mar 2008 17:15:46 +0100

 --PEIAKu/WMn1b1Hv9
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Wed, Mar 19, 2008 at 03:25:01PM +0000, Rob Q wrote:
 >  gcc -DHAVE_CONFIG_H -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=
 >  =3D64 -DDEF_UMASK=3D022 -I/usr/obj/pkg/pkgtools/pkg_install/work/libarchive=
 >  /libarchive -DHAVE_NBCOMPAT_H=3D1 -I/usr/obj/pkg/pkgtools/pkg_install/work/=
 >  libnbcompat -I. -I. -I../lib  -DSYSCONFDIR=3D\"/usr/pkg/etc\" -O -mv8 -pipe=
 >   -c audit.c
 >  audit.c: In function `parse_options':
 >  audit.c:85: error: `optreset' undeclared (first use in this function)
 >  audit.c:85: error: (Each undeclared identifier is reported only once
 >  audit.c:85: error: for each function it appears in.)
 
 Please try the attached patch for this part of the problem. The other
 one should be fixed.
 
 Joerg
 
 --PEIAKu/WMn1b1Hv9
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="getopt.diff"
 
 Index: libnbcompat/files/nbcompat/unistd.h
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/nbcompat/unistd.h,v
 retrieving revision 1.2
 diff -u -p -r1.2 unistd.h
 --- libnbcompat/files/nbcompat/unistd.h        23 Aug 2004 03:32:13 -0000      
1.2
 +++ libnbcompat/files/nbcompat/unistd.h        19 Mar 2008 15:40:00 -0000
 @@ -47,14 +47,18 @@
   * Declare functions and macros that may be missing in <unistd.h>.
   */
  
 -#if !HAVE_OPTARG_D
 +#if !HAVE_DECL_OPTARG
  extern char   *optarg;
  #endif
  
 -#if !HAVE_OPTIND_D
 +#if !HAVE_DECL_OPTIND
  extern int    optind;
  #endif
  
 +#if !HAVE_DECL_OPTRESET
 +extern int    optreset;
 +#endif
 +
  #if !HAVE_GETPASS_D
  char  *getpass(const char *);
  #endif
 Index: pkg_install/files/admin/audit.c
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/admin/audit.c,v
 retrieving revision 1.3
 diff -u -p -r1.3 audit.c
 --- pkg_install/files/admin/audit.c    19 Mar 2008 15:33:12 -0000      1.3
 +++ pkg_install/files/admin/audit.c    19 Mar 2008 15:40:00 -0000
 @@ -67,8 +67,10 @@ __RCSID("$NetBSD: audit.c,v 1.3 2008/03/
  #if HAVE_STRING_H
  #include <string.h>
  #endif
 -#if HAVE_UNISTD_H
 +#ifdef NETBSD
  #include <unistd.h>
 +#else
 +#include <nbcompat/unistd.h>
  #endif
  
  #include "admin.h"
 
 --PEIAKu/WMn1b1Hv9--
 


Home | Main Index | Thread Index | Old Index