View | Details | Raw Unified | Return to bug 227811 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	cpuid
4
PORTNAME=	cpuid
5
PORTVERSION=	20170122
5
PORTVERSION=	20180519
6
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
7
MASTER_SITES=	http://www.etallen.com/cpuid/
7
MASTER_SITES=	http://www.etallen.com/cpuid/
8
PKGNAMESUFFIX=	${CPUID_SUFFIX}
8
PKGNAMESUFFIX=	${CPUID_SUFFIX}
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1500174826
1
TIMESTAMP = 1526817399
2
SHA256 (cpuid-20170122.src.tar.gz) = 667612aae6704341dd10844e97c84c5c5c8700817a5937a3c293b55013bc4865
2
SHA256 (cpuid-20180519.src.tar.gz) = 967823be36f23cbc972eb0aa882d069c1d155a5978990ac3bcf425e6a2e7ff9a
3
SIZE (cpuid-20170122.src.tar.gz) = 80046
3
SIZE (cpuid-20180519.src.tar.gz) = 84784
(-)files/patch-cpuid.c (-9 / +21 lines)
Lines 1-15 Link Here
1
--- cpuid.c.orig	2016-11-30 14:34:23 UTC
1
--- cpuid.c.orig	2018-04-19 14:15:07 UTC
2
+++ cpuid.c
2
+++ cpuid.c
3
@@ -23,6 +23,8 @@
3
@@ -21,17 +21,19 @@
4
 #ifdef __linux__
5
 #define USE_CPUID_MODULE
4
 #define USE_KERNEL_SCHED_SETAFFINITY
6
 #define USE_KERNEL_SCHED_SETAFFINITY
7
+#include <sys/sysmacros.h>
5
 #endif
8
 #endif
6
 
9
 
10
 #if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ >= 40300
11
 #define USE_CPUID_COUNT
12
 #endif
13
 
7
+#define CPUID_MAJOR 0
14
+#define CPUID_MAJOR 0
8
+
15
+
9
 #define _GNU_SOURCE
16
 #define _GNU_SOURCE
10
 #include <stdio.h>
17
 #include <stdio.h>
11
 #include <sys/types.h>
18
 #include <sys/types.h>
12
@@ -34,6 +36,8 @@
19
 #include <sys/stat.h>
20
-#include <sys/sysmacros.h>
21
 #include <fcntl.h>
22
 #include <errno.h>
23
 #include <unistd.h>
24
@@ -39,6 +41,8 @@
13
 #include <string.h>
25
 #include <string.h>
14
 #include <regex.h>
26
 #include <regex.h>
15
 #include <getopt.h>
27
 #include <getopt.h>
Lines 18-24 Link Here
18
 
30
 
19
 #ifdef USE_CPUID_MODULE
31
 #ifdef USE_CPUID_MODULE
20
 #include <linux/major.h>
32
 #include <linux/major.h>
21
@@ -58,6 +62,7 @@ typedef const char* const  ccstring;
33
@@ -67,6 +71,7 @@ typedef const char* const  ccstring;
22
 #define XSTR(x)  STR(x)
34
 #define XSTR(x)  STR(x)
23
 
35
 
24
 
36
 
Lines 26-32 Link Here
26
 #define MAX(l,r)            ((l) > (r) ? (l) : (r))
38
 #define MAX(l,r)            ((l) > (r) ? (l) : (r))
27
 
39
 
28
 #define LENGTH(array, type) (sizeof(array) / sizeof(type))
40
 #define LENGTH(array, type) (sizeof(array) / sizeof(type))
29
@@ -6471,11 +6476,16 @@ real_setup(unsigned int  cpu,
41
@@ -6622,11 +6627,16 @@ real_setup(unsigned int  cpu,
30
          int  status;
42
          int  status;
31
          status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask);
43
          status = syscall(__NR_sched_setaffinity, 0, sizeof(mask), &mask);
32
 #else
44
 #else
Lines 45-53 Link Here
45
 #endif
57
 #endif
46
          if (status == -1) {
58
          if (status == -1) {
47
             if (cpu > 0) {
59
             if (cpu > 0) {
48
@@ -6590,11 +6600,14 @@ static int real_get (int           cpuid
60
@@ -6749,11 +6759,14 @@ static int real_get (int           cpuid
49
           : "a" (reg), 
50
             "c" (ecx));
61
             "c" (ecx));
62
 #endif
51
    } else {
63
    } else {
52
-      off64_t  result;
64
-      off64_t  result;
53
-      off64_t  offset = ((off64_t)ecx << 32) + reg;
65
-      off64_t  offset = ((off64_t)ecx << 32) + reg;
Lines 63-69 Link Here
63
       if (result == -1) {
75
       if (result == -1) {
64
          if (quiet) {
76
          if (quiet) {
65
             return FALSE;
77
             return FALSE;
66
@@ -7138,7 +7151,7 @@ main(int     argc,
78
@@ -7307,7 +7320,7 @@ main(int     argc,
67
    };
79
    };
68
 
80
 
69
    boolean        opt_one_cpu     = FALSE;
81
    boolean        opt_one_cpu     = FALSE;
Lines 72-78 Link Here
72
    boolean        opt_kernel      = FALSE;
84
    boolean        opt_kernel      = FALSE;
73
    boolean        opt_raw         = FALSE;
85
    boolean        opt_raw         = FALSE;
74
    boolean        opt_debug       = FALSE;
86
    boolean        opt_debug       = FALSE;
75
@@ -7268,7 +7281,8 @@ main(int     argc,
87
@@ -7437,7 +7450,8 @@ main(int     argc,
76
    }
88
    }
77
 
89
 
78
    // Default to -i.  So use inst unless -k is specified.
90
    // Default to -i.  So use inst unless -k is specified.

Return to bug 227811