]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If the target is empty or set to "default" just use the host target
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 5 May 2022 09:26:34 +0000 (11:26 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 5 May 2022 09:26:34 +0000 (11:26 +0200)
This makes it a little easier in the build framework

scripts/jlibtool.c

index 279d9a5799368e21b65d40c4524b918d76f457e5..f6524826700191bd04c9416890144f3ded4e07b9 100644 (file)
@@ -1016,6 +1016,8 @@ static int parse_long_opt(char const *arg, command_t *cmd)
                target_map_t const *p;
                target_map_t const *end;
 
+               if (!strlen(value) || (strcmp(value, "default") == 0)) return 1;
+
                for (p = target_map, end = target_map + (sizeof(target_map) / sizeof(*target_map));
                     p < end;
                     p++) {
@@ -1056,7 +1058,6 @@ static int parse_long_opt(char const *arg, command_t *cmd)
                        }
                        exit(1);
                }
-
        } else if (strcmp(var, "mode") == 0) {
                if (cmd->mode != MODE_UNKNOWN) {
                        ERROR("Cannot set --mode twice\n");