Subject: pkg/29152: pkgfind patch for linux and openbsd
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <pancake@phreaker.net>
List: pkgsrc-bugs
Date: 01/29/2005 16:41:00
>Number: 29152
>Category: pkg
>Synopsis: pkgfind doesn't builds on OpenBSD/Linux
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 29 16:41:00 +0000 2005
>Originator: pancake@phreaker.net
>Release: Linux 2.6.8.1
>Organization:
>Environment:
System: Linux bare 2.6.8.1 #10 Sat Jan 29 14:32:28 VET 2005 i686 GNU/Linux
Architecture: i686
Machine: i686
>Description:
openbsd and linux doesn'ti mplement getprogname and setprogname.
>How-To-Repeat:
>Fix:
Index: files/pkgfind.c
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/pkgtools/pkgfind/files/pkgfind.c,v
retrieving revision 1.5
diff -u -r1.5 pkgfind.c
--- files/pkgfind.c 27 Jan 2005 20:42:23 -0000 1.5
+++ files/pkgfind.c 29 Jan 2005 16:37:47 -0000
@@ -70,6 +70,18 @@
static int Cflag, cflag, qflag;
+#if __linux__ || __OpenBSD__
+char *name=NULL;
+char *getprogname()
+{
+ return name;
+}
+void setprogname(char *progname)
+{
+ name=progname;
+}
+#endif
+
int
main(int argc, char *argv[])
{
>Unformatted: