NetBSD Problem Report #28597
From www@netbsd.org Thu Dec 9 22:28:58 2004
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id 8FE03251F66; Thu, 9 Dec 2004 22:28:58 +0000 (UTC)
Message-Id: <20041209222858.8FE03251F66@narn.netbsd.org>
Date: Thu, 9 Dec 2004 22:28:58 +0000 (UTC)
From: georg.schwarz@freenet.de
Reply-To: georg.schwarz@freenet.de
To: gnats-bugs@netbsd.org
Subject: devel/libgetopt compiling problems
X-Send-Pr-Version: www-1.0
>Number: 28597
>Category: pkg
>Synopsis: devel/libgetopt compiling problems
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 09 22:30:00 +0000 2004
>Closed-Date: Sun Dec 12 17:17:04 +0000 2004
>Last-Modified: Mon Dec 13 20:11:03 +0000 2004
>Originator: Georg Schwarz
>Release: current pkgsrc
>Organization:
>Environment:
>Description:
IRIX 5 comes with /usr/include/getopt.h, but it is pretty much nonstandard, so it makes sense to install devel/libgetopt.
In getopt_long.c optreset is being used even if REPLACE_GETOPT is undefined, in which case however it is not defined.
>How-To-Repeat:
>Fix:
I changed Makefile like this:
--- Makefile.orig Thu Dec 9 23:07:59 2004
+++ Makefile Thu Dec 9 23:09:06 2004
@@ -15,7 +15,8 @@
WRKSRC= ${WRKDIR}/libgetopt
-.if exists(/usr/include/getopt.h)
+.include "../../mk/bsd.prefs.mk"
+.if exists(/usr/include/getopt.h) && empty(LOWER_OPSYS:Mirix5*)
PKG_SKIP_REASON= "${PKGNAME} is part of your ${OPSYS} distribution"
.endif
In getopt_long.c add
int optreset;
also if REPLACE_GETOPT is not defined.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: recht@netbsd.org
State-Changed-When: Sun, 12 Dec 2004 17:17:04 +0000
State-Changed-Why:
Patch commited. Thanks for the PR!
From: Marc Recht <recht@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/28597 CVS commit: pkgsrc/devel/libgetopt
Date: Sun, 12 Dec 2004 17:16:27 +0000 (UTC)
Module Name: pkgsrc
Committed By: recht
Date: Sun Dec 12 17:16:27 UTC 2004
Modified Files:
pkgsrc/devel/libgetopt: Makefile
Log Message:
Fix build on IRIX 5 whichhas a nonstandard /usr/include/getopt.h.
patch by Georg Schwarz in PR 28597
To generate a diff of this commit:
cvs rdiff -r1.14 -r1.15 pkgsrc/devel/libgetopt/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.