]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: haproxy: compiling config cpu parsing handling when needed
authorDavid Carlier <devnexen@gmail.com>
Fri, 1 Dec 2017 09:14:02 +0000 (09:14 +0000)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Dec 2017 15:05:35 +0000 (16:05 +0100)
parse_cpu_set is only relevant where there is cpu affinity,
avoiding in the process compilation warning as well.

src/cfgparse.c

index e7e32cf9d2e414441b5371184f5efa0ed2b04e21..b3202a68cf3d2541490cc908bb421cb3b04e61c8 100644 (file)
@@ -646,6 +646,7 @@ int parse_process_number(const char *arg, unsigned long *proc, int *autoinc, cha
        return 0;
 }
 
+#ifdef USE_CPU_AFFINITY
 /* Parse cpu sets. Each CPU set is either a unique number between 0 and
  * <LONGBITS> or a range with two such numbers delimited by a dash
  * ('-'). Multiple CPU numbers or ranges may be specified. On success, it
@@ -687,6 +688,8 @@ static unsigned long parse_cpu_set(const char **args, unsigned long *cpu_set, ch
        }
        return 0;
 }
+#endif
+
 /*
  * parse a line in a <global> section. Returns the error code, 0 if OK, or
  * any combination of :