aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chown.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/chown.c')
-rw-r--r--coreutils/chown.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 1bfc725cc..0c77529ec 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -127,11 +127,12 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
int opt, flags;
struct param_t param;
-#if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
- applet_long_options = chown_longopts;
-#endif
opt_complementary = "-2";
+#if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
+ opt = getopt32long(argv, OPT_STR, chown_longopts);
+#else
opt = getopt32(argv, OPT_STR);
+#endif
argv += optind;
/* This matches coreutils behavior (almost - see below) */