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:
parent
b000638d5e
commit
3175da061a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user