mirror of
https://git.freebsd.org/ports.git
synced 2025-05-17 17:43:11 -04:00
- Fix fchflags(). (typo) [1] - Fix hw.availpages sysctl. [1] - Fix sysctl kern.usrstack and kern.ps_strings invoked from sysctl(8). - Bump PORTREVISION. Reported by: sbruno [1]
24 lines
826 B
Text
24 lines
826 B
Text
--- a/bsd-user/freebsd/os-sys.c
|
|
+++ b/bsd-user/freebsd/os-sys.c
|
|
@@ -165,7 +165,9 @@ abi_long do_freebsd_sysctl(CPUArchState
|
|
switch (snamep[1]) {
|
|
case KERN_USRSTACK:
|
|
#if TARGET_USRSTACK != 0
|
|
- (*(abi_ulong *)holdp) = tswapal(TARGET_USRSTACK);
|
|
+ if (oldlen) {
|
|
+ (*(abi_ulong *)holdp) = tswapal(TARGET_USRSTACK);
|
|
+ }
|
|
holdlen = sizeof(abi_ulong);
|
|
ret = 0;
|
|
#else
|
|
@@ -175,7 +177,9 @@ abi_long do_freebsd_sysctl(CPUArchState
|
|
|
|
case KERN_PS_STRINGS:
|
|
#if defined(TARGET_PS_STRINGS)
|
|
- (*(abi_ulong *)holdp) = tswapal(TARGET_PS_STRINGS);
|
|
+ if (oldlen) {
|
|
+ (*(abi_ulong *)holdp) = tswapal(TARGET_PS_STRINGS);
|
|
+ }
|
|
holdlen = sizeof(abi_ulong);
|
|
ret = 0;
|
|
#else
|