FYI: struggling with 'int optind'

Lambrecht Jürgen J.Lambrecht at TELEVIC.com
Thu May 2 12:47:49 UTC 2013


Hello,

I am struggling to get the busybox dhcp server cross-compiled (ARM) for 
the embedded RTOS eCos.
I took the latest code from git.
I have this error:
dhcpd.c:328:10: error: ‘optind’ undeclared (first use in this function)

I found out that 'optind' is declared in /usr/include/getopt.h.
This is given by the toolchain.

'int optind' is defined in your toolchain libraries.
This is OK for a linux (cross-)compilation, but not for an eCos one.

Is it correct that busybox only works (and compiles) for a system with a 
shell?
I don't compile the busybox ash shell (or another one) and eCos does not 
have a shell. So I guess I will have to work around this.

Kind regards,
Jürgen

P.S.: I started the email before I searched in a ARM-toolchain for 
linux, where I found my answers. But I decided still to send it.

-- 
Jürgen Lambrecht
R&D Associate
Tel: +32 (0)51 303045    Fax: +32 (0)51 310670
http://www.televic-rail.com
Televic Rail NV - Leo Bekaertlaan 1 - 8870 Izegem - Belgium
Company number 0825.539.581 - RPR Kortrijk


More information about the busybox mailing list