lib: posix: add missing getopt_long guard
Added ifdef guard (CONFIG_GETOPT_LONG) around the functions in getopt_shim.c that requires getopt_long implementation. Signed-off-by: Magne Værnes <magne.varnes@nordicsemi.no>
This commit is contained in:
committed by
Henrik Brix Andersen
parent
7c66a65c73
commit
c2011b9d0f
@@ -34,6 +34,7 @@ void z_getopt_global_state_update_shim(struct sys_getopt_state *state)
|
||||
optarg = state->optarg;
|
||||
}
|
||||
|
||||
#if CONFIG_GETOPT_LONG
|
||||
int getopt_long(int argc, char *const argv[], const char *shortopts,
|
||||
const struct option *longopts, int *longind)
|
||||
{
|
||||
@@ -45,3 +46,4 @@ int getopt_long_only(int argc, char *const argv[], const char *shortopts,
|
||||
{
|
||||
return sys_getopt_long_only(argc, argv, shortopts, longopts, longind);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user