Subject: Re: pkg_install on Linux wants optind defined
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-pkg
Date: 09/04/2003 23:28:23
--48TaNjbzBVislYPb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

"Jeremy C. Reed" <reed@reedmedia.net> wrote:
=20
> bmake in pkg_install doesn't fail, but it seems like it should, since
> it has these errors:
>=20
> cc -DHAVE_CONFIG_H -DBINDIR=3D\"/usr/sbin\" -DHAVE_CONFIG_H
> -DBINDIR=3D\"/usr/sbin\"
>  -I/usr/include/libnbcompat  -I/usr/include -I. -I. -I../lib -g
> -I/usr/include/libnbcompat -I/usr/include -c main.c
> main.c: In function `main':
> main.c:163: error: `optind' undeclared (first use in this function)
> main.c:163: error: (Each undeclared identifier is reported only once
> main.c:163: error: for each function it appears in.)
> *** Error code 1

Same problem under Irix.  AFAICT, it wants 'optind' and friends to be
declared as 'extern'.

-Jan

--=20
I seem to be having this tremendous difficulty with my lifestyle.

--48TaNjbzBVislYPb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (NetBSD)

iD8DBQE/WALXfFtkr68iakwRAqtZAKDxYewduAyW2AZ2uKBA7ZDG0GkUigCeJgHu
WKAL1GjVcvJpfOD9V1ksSEA=
=r/hD
-----END PGP SIGNATURE-----

--48TaNjbzBVislYPb--