mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
FreeBSD: fix internal sysctlbyname
I used the libc interface rather than the syscall interface. The syscall also has the name length which libc adds.
This commit is contained in:
parent
cdabd4ba74
commit
4c80a467a9
@ -1200,8 +1200,9 @@ void VG_(do_atfork_child)(ThreadId tid)
|
||||
#if defined(VGO_freebsd)
|
||||
Int VG_(sysctlbyname)(const HChar *name, void *oldp, SizeT *oldlenp, const void *newp, SizeT newlen)
|
||||
{
|
||||
vg_assert(name);
|
||||
#if (FREEBSD_VERS >= FREEBSD_12_2)
|
||||
SysRes res = VG_(do_syscall5)(__NR___sysctlbyname, (UWord)name, (UWord)oldp, (UWord)oldlenp, (UWord)newp, (UWord)newlen);
|
||||
SysRes res = VG_(do_syscall6)(__NR___sysctlbyname, (RegWord)name, VG_(strlen)(name), (RegWord)oldp, (RegWord)oldlenp, (RegWord)newp, (RegWord)newlen);
|
||||
return sr_isError(res) ? -1 : sr_Res(res);
|
||||
#else
|
||||
Int oid[2];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user