[PATCH wlclock] Don't clobber global optind with BSD getopt_long()
Export this patch
$ wlclock --corner-radius 90
ERROR: Radius configuration requires one or four arguments.
---
src/wlclock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wlclock.c b/src/wlclock.c
index a26d0d3e0eae..bbbcca70570c 100644
--- a/src/wlclock.c
+++ b/src/wlclock.c
@@ -330,7 +330,7 @@ static bool handle_command_flags (int argc, char *argv[])
int opt, args;
extern int optind;
extern char *optarg;
- while ( (opt = getopt_long(argc, argv, "hvV", opts, &optind)) != -1 ) switch (opt)
+ while ( (opt = getopt_long(argc, argv, "hvV", opts, NULL)) != -1 ) switch (opt)
{
case 'h':
fputs(usage, stderr);