How can I compile code that uses getsubopt()?
Pergunta
I want to parse a list of options of the form key1=val1, key2=val2, etc
(like the options to mount -o
). The getsubopt()
function seems perfect for this task (http://www.gnu.org/s/hello/manual/libc/Suboptions.html). However, when I try to compile my code using gcc, I get:
warning: implicit declaration of function ‘getsubopt’
and the program segfaults when I run it.
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow