Fix build on NetBSD-4.0/i386. Patches from Robert Elz in PR 41963.
(Also sent upstream.)
This commit is contained in:
parent
215ae643d9
commit
bfb930bf03
3 changed files with 29 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
$NetBSD: distinfo,v 1.2 2009/08/31 08:59:11 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.3 2009/09/04 16:57:14 wiz Exp $
|
||||
|
||||
SHA1 (xz-4.999.9beta.tar.gz) = 9627de3997ddcdb02f8d327e84b2cf1941ecd230
|
||||
RMD160 (xz-4.999.9beta.tar.gz) = 1253ce01746c748c8549effa5041224044919c4e
|
||||
Size (xz-4.999.9beta.tar.gz) = 1037541 bytes
|
||||
SHA1 (patch-aa) = e12358a68476f8c59b0f2886efc185bf2c1d1641
|
||||
SHA1 (patch-ab) = 190f58a65ebec8e7a978eb193e0841ec835bf3f1
|
||||
|
|
13
archivers/xz/patches/patch-aa
Normal file
13
archivers/xz/patches/patch-aa
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-aa,v 1.1 2009/09/04 16:57:14 wiz Exp $
|
||||
|
||||
--- src/common/cpucores.h.orig 2009-08-27 15:37:12.000000000 +0000
|
||||
+++ src/common/cpucores.h
|
||||
@@ -40,7 +40,7 @@ cpucores(void)
|
||||
int name[2] = { CTL_HW, HW_NCPU };
|
||||
int cpus;
|
||||
size_t cpus_size = sizeof(cpus);
|
||||
- if (!sysctl(name, &cpus, &cpus_size, NULL, NULL)
|
||||
+ if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) > 0
|
||||
&& cpus_size == sizeof(cpus) && cpus > 0)
|
||||
ret = (uint32_t)(cpus);
|
||||
#endif
|
13
archivers/xz/patches/patch-ab
Normal file
13
archivers/xz/patches/patch-ab
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-ab,v 1.1 2009/09/04 16:57:14 wiz Exp $
|
||||
|
||||
--- src/common/physmem.h.orig 2009-08-27 15:37:12.000000000 +0000
|
||||
+++ src/common/physmem.h
|
||||
@@ -104,7 +104,7 @@ physmem(void)
|
||||
uint64_t u64;
|
||||
} mem;
|
||||
size_t mem_ptr_size = sizeof(mem.u64);
|
||||
- if (!sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, NULL)) {
|
||||
+ if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) > 0) {
|
||||
// IIRC, 64-bit "return value" is possible on some 64-bit
|
||||
// BSD systems even with HW_PHYSMEM (instead of HW_PHYSMEM64),
|
||||
// so support both.
|
Loading…
Reference in a new issue