Paul Sykes
2018-11-16 09:54:23 UTC
Hi,
First post to the list, apologies in advance for any etiquette transgressions.
On my OpenWrt builds I found that the optopt variable was never set
when calling the function getopt. I tested the same code on my desktop
using the gcc wrapper and optopt was set as expected.
Debugging showed that optopt was being set correctly in getopt.c
however the variable was not being set in my calling code.
Adding optopt to the file 'dynamic.list' resolved the issue when
building with OpenWrt. I noticed that all the other extern variables
for getopt appear in dynamic.list except optopt.
Paul.
First post to the list, apologies in advance for any etiquette transgressions.
On my OpenWrt builds I found that the optopt variable was never set
when calling the function getopt. I tested the same code on my desktop
using the gcc wrapper and optopt was set as expected.
Debugging showed that optopt was being set correctly in getopt.c
however the variable was not being set in my calling code.
Adding optopt to the file 'dynamic.list' resolved the issue when
building with OpenWrt. I noticed that all the other extern variables
for getopt appear in dynamic.list except optopt.
Paul.