Fix the retrieval of USRSTACK via sysctl so that it works for 64-bit

archs.  This should fix libc_r on alpha.

Submitted by:	Bernd Walter <ticso@cicely9.cicely.de>
This commit is contained in:
deischen 2001-12-18 02:02:59 +00:00
parent b000638d5e
commit 3175da061a
3 changed files with 6 additions and 6 deletions

View File

@ -269,9 +269,9 @@ _thread_init(void)
/* Find the stack top */
mib[0] = CTL_KERN;
mib[1] = KERN_USRSTACK;
len = sizeof (int);
len = sizeof (_usrstack);
if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1)
_usrstack = USRSTACK;
_usrstack = (void *)USRSTACK;
/*
* Create a red zone below the main stack. All other stacks are
* constrained to a maximum size by the paramters passed to

View File

@ -269,9 +269,9 @@ _thread_init(void)
/* Find the stack top */
mib[0] = CTL_KERN;
mib[1] = KERN_USRSTACK;
len = sizeof (int);
len = sizeof (_usrstack);
if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1)
_usrstack = USRSTACK;
_usrstack = (void *)USRSTACK;
/*
* Create a red zone below the main stack. All other stacks are
* constrained to a maximum size by the paramters passed to

View File

@ -269,9 +269,9 @@ _thread_init(void)
/* Find the stack top */
mib[0] = CTL_KERN;
mib[1] = KERN_USRSTACK;
len = sizeof (int);
len = sizeof (_usrstack);
if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1)
_usrstack = USRSTACK;
_usrstack = (void *)USRSTACK;
/*
* Create a red zone below the main stack. All other stacks are
* constrained to a maximum size by the paramters passed to