]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
hsbench: fix flag handling
authorMatthew Barr <matthew.barr@intel.com>
Tue, 13 Jun 2017 23:04:21 +0000 (09:04 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Thu, 15 Jun 2017 05:41:30 +0000 (15:41 +1000)
tools/hsbench/main.cpp

index 3153737eec15fd1d566dc24527b4269b71225279..2d92cd846f80ca76d65f06a979c108c8cf778438 100644 (file)
@@ -205,7 +205,7 @@ static
 void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
                  UNUSED unique_ptr<Grey> &grey) {
     const char options[] = "-b:c:Cd:e:E:G:hi:n:No:p:sVw:z:"
-#if HAVE_DECL_PTHREAD_SETAFFINITY_N
+#ifdef HAVE_DECL_PTHREAD_SETAFFINITY_NP
         "T:" // add the thread flag
 #endif
         ;
@@ -287,6 +287,7 @@ void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
         case 'V':
             scan_mode = ScanMode::VECTORED;
             break;
+#ifdef HAVE_DECL_PTHREAD_SETAFFINITY_NP
         case 'T':
             if (!strToList(optarg, threadCores)) {
                 usage("Couldn't parse argument to -T flag, should be"
@@ -294,6 +295,7 @@ void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
                 exit(1);
             }
             break;
+#endif
         case 'z': {
             unsigned int sinumber;
             if (!fromString(optarg, sinumber)) {