]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
hsbench: cpuset portability
authorMatthew Barr <matthew.barr@intel.com>
Wed, 14 Jun 2017 02:58:51 +0000 (12:58 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Thu, 15 Jun 2017 05:41:30 +0000 (15:41 +1000)
tools/hsbench/main.cpp

index b8c7b7ddc093ff3739464d7b3520bad023a73d73..9c5fd6cbc848bc1a1da252559c1f75305f89d64a 100644 (file)
@@ -125,10 +125,10 @@ public:
     // Apply processor affinity (if available) to this thread.
     bool affine(UNUSED int cpu) {
 #ifdef HAVE_DECL_PTHREAD_SETAFFINITY_NP
-#if defined(__linux__)
-        cpu_set_t cpuset;
-#else // BSD
+#if defined(__FreeBSD__)
         cpuset_t cpuset;
+#else
+        cpu_set_t cpuset;
 #endif
         CPU_ZERO(&cpuset);
         assert(cpu >= 0 && cpu < CPU_SETSIZE);