pkgsrc-Users archive

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

Optarg and Optind undeclared when trying to build chrpath



On Solaris 9, pkgsrc bootstrapped gcc34, I try to build chrpath:

cc -DHAVE_CONFIG_H -I. -I. -I.
-I/opt/omnibus/bootstrap/gcc34/include
-I/opt/omnibus/bootstrap/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.6/include
-I/usr/include  -O -I/opt/omnibus/bootstrap/gcc34/include
-I/opt/omnibus/bootstrap/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.6/include
-I/usr/include -ansi -pedantic -W -Wall -Wcast-align -Wcast-qual
-Wcomments -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith
-Wreturn-type -Wstrict-prototypes -c main.c
main.c: In function `main':
main.c:85: warning: implicit declaration of function `getopt'
main.c:100: error: `optarg' undeclared (first use in this function)
main.c:100: error: (Each undeclared identifier is reported only once
main.c:100: error: for each function it appears in.)
main.c:120: error: `optind' undeclared (first use in this function)
*** Error code 1

Stop.
bmake: stopped in /opt/pkgsrc/devel/chrpath/work/chrpath-0.13
*** Error code 1

Stop.
bmake: stopped in /opt/pkgsrc/devel/chrpath/work/chrpath-0.13
*** Error code 1

Stop.
bmake: stopped in /opt/pkgsrc/devel/chrpath/work/chrpath-0.13

optarg and optind are in both stdout.h and unistd.h

I added an explicit include for both  libraries to main.c, but get the
same outcome.

What am I missing?

S.


Home | Main Index | Thread Index | Old Index