summaryrefslogtreecommitdiff
path: root/cad/electric/files
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-09-20 02:32:14 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-09-20 02:32:14 +0000
commit972fda0d8fe45dc597990f8c4d47ebeb0122bf87 (patch)
treee2ac4a8bc1fcc1688ffd041101551d0387cb03fe /cad/electric/files
parentAdd missing files (diff)
Update to 6.0.6
Diffstat (limited to 'cad/electric/files')
-rw-r--r--cad/electric/files/patch-src::graph::graphunixx11.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/cad/electric/files/patch-src::graph::graphunixx11.c b/cad/electric/files/patch-src::graph::graphunixx11.c
new file mode 100644
index 000000000000..cb008da2ba80
--- /dev/null
+++ b/cad/electric/files/patch-src::graph::graphunixx11.c
@@ -0,0 +1,26 @@
+--- src/graph/graphunixx11.c.orig Fri Jun 14 20:01:11 2002
++++ src/graph/graphunixx11.c Thu Sep 19 23:30:14 2002
+@@ -149,6 +149,8 @@
+ INTBIG gra_initializetcl(void);
+ #endif
+
++#include <sys/sysctl.h>
++
+ /****** windows ******/
+
+ #define WMLEFTBORDER 8 /* size of left border for windows */
+@@ -2889,8 +2891,13 @@
+ INTBIG enumprocessors(void)
+ {
+ INTBIG numproc;
++ size_t proclen;
++
++ proclen = sizeof(numproc);
++ if ((sysctlbyname("hw.ncpu", &numproc, &proclen, NULL, 0) < 0) ||
++ (proclen != sizeof(numproc)))
++ numproc = 1;
+
+- numproc = sysconf(_SC_NPROCESSORS_ONLN);
+ return(numproc);
+ }
+