Index: head/sysutils/cpuid/Makefile =================================================================== --- head/sysutils/cpuid/Makefile (revision 427298) +++ head/sysutils/cpuid/Makefile (revision 427299) @@ -1,38 +1,38 @@ # Created by: uffe@uffe.org # $FreeBSD$ PORTNAME= cpuid -PORTVERSION= 20160814 +PORTVERSION= 20161114 CATEGORIES= sysutils MASTER_SITES= http://www.etallen.com/cpuid/ PKGNAMESUFFIX= ${CPUID_SUFFIX} DISTNAME= ${PORTNAME}-${PORTVERSION}.src MAINTAINER= pkubaj@anongoth.pl COMMENT= Tool to dump x86 CPUID information about the CPU(s) LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= only works with x86 CPUs USES= gmake perl5 USE_PERL5= build ALL_TARGET= default WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} # Renamed to avoid conflict with misc/cpuid CPUID_SUFFIX= -etallen PLIST_FILES= bin/cpuid${CPUID_SUFFIX} \ man/man1/cpuid${CPUID_SUFFIX}.1.gz post-patch: ${REINPLACE_CMD} 's,CFL=.*,& -pthread,' ${WRKSRC}/Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/cpuid ${STAGEDIR}${PREFIX}/bin/cpuid${CPUID_SUFFIX} ${INSTALL_MAN} ${WRKSRC}/cpuid.man.gz ${STAGEDIR}${PREFIX}/man/man1/cpuid${CPUID_SUFFIX}.1.gz .include Index: head/sysutils/cpuid/distinfo =================================================================== --- head/sysutils/cpuid/distinfo (revision 427298) +++ head/sysutils/cpuid/distinfo (revision 427299) @@ -1,3 +1,3 @@ -TIMESTAMP = 1476108297 -SHA256 (cpuid-20160814.src.tar.gz) = fd4e2b2d88f417ae32f47a92d29351de395a36578fde8aedc228e2e131f38ecd -SIZE (cpuid-20160814.src.tar.gz) = 77160 +TIMESTAMP = 1480199308 +SHA256 (cpuid-20161114.src.tar.gz) = 19564f068d0bc1a30d033476da89a9f348fd94b6dbfeae22dab7974514ffc3aa +SIZE (cpuid-20161114.src.tar.gz) = 78758 Index: head/sysutils/cpuid/files/patch-cpuid.c =================================================================== --- head/sysutils/cpuid/files/patch-cpuid.c (revision 427298) +++ head/sysutils/cpuid/files/patch-cpuid.c (revision 427299) @@ -1,77 +1,76 @@ ---- cpuid.c.orig 2016-08-15 03:54:53 UTC +--- cpuid.c.orig 2016-11-14 01:57:53 UTC +++ cpuid.c @@ -23,6 +23,8 @@ #define USE_KERNEL_SCHED_SETAFFINITY #endif +#define CPUID_MAJOR 0 + #define _GNU_SOURCE #include #include @@ -34,6 +36,8 @@ #include #include #include +#include +#include #ifdef USE_CPUID_MODULE #include -@@ -6420,11 +6424,16 @@ real_setup(unsigned int cpu, +@@ -6471,11 +6475,16 @@ real_setup(unsigned int cpu, int status; status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask); #else - cpu_set_t cpuset; + cpuset_t cpuset; CPU_ZERO(&cpuset); CPU_SET(cpu, &cpuset); int status; - status = sched_setaffinity(0, sizeof(cpu_set_t), &cpuset); +#if defined(__FreeBSD__) + status = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, + -1, sizeof(cpuset_t), &cpuset); +#else + status = sched_setaffinity(0, sizeof(cpuset_t), &cpuset); +#endif #endif if (status == -1) { if (cpu > 0) { -@@ -6539,11 +6548,14 @@ static int real_get (int cpuid +@@ -6590,11 +6599,14 @@ static int real_get (int cpuid : "a" (reg), "c" (ecx)); } else { - off64_t result; - off64_t offset = ((off64_t)ecx << 32) + reg; + //off64_t result; + //off64_t offset = ((uint64_t)ecx << 32) + reg; + uint64_t result; + uint64_t offset = ((uint64_t)ecx << 32) + reg; int status; - result = lseek64(cpuid_fd, offset, SEEK_SET); + //result = lseek64(cpuid_fd, offset, SEEK_SET); + result = lseek(cpuid_fd, offset, SEEK_SET); if (result == -1) { if (quiet) { return FALSE; -@@ -7050,7 +7062,8 @@ main(int argc, +@@ -7134,7 +7146,7 @@ main(int argc, }; - boolean opt_one_cpu = FALSE; -- boolean opt_inst = FALSE; -+ //boolean opt_inst = FALSE; -+ boolean opt_inst = TRUE; - boolean opt_kernel = FALSE; - boolean opt_raw = FALSE; - boolean opt_debug = FALSE; -@@ -7134,7 +7147,8 @@ main(int argc, + boolean opt_one_cpu = FALSE; +- boolean opt_inst = FALSE; ++ boolean opt_inst = TRUE; + boolean opt_kernel = FALSE; + boolean opt_raw = FALSE; + boolean opt_debug = FALSE; +@@ -7264,7 +7276,8 @@ main(int argc, } // Default to -i. So use inst unless -k is specified. - boolean inst = !opt_kernel; + //boolean inst = !opt_kernel; + boolean inst = TRUE; if (opt_version) { printf("cpuid version %s\n", XSTR(VERSION));