summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorTommaso Marinelli <tommarin@ucm.es>2019-10-06 21:12:06 +0200
committerTommaso Marinelli <tommarin@ucm.es>2019-10-23 12:00:38 +0000
commit239054f48439c18b93e1a70ff29dbcb0c4742cff (patch)
tree4ff5e17cb48b7066e8fda14c1de4a66d43720da8 /src/arch/arm
parente77b9d042435d3ff59dcc747add340e41e10a478 (diff)
downloadgem5-239054f48439c18b93e1a70ff29dbcb0c4742cff.tar.xz
arch: Drop sysctl support if built against glibc
Since glibc 2.30 the sysctl() function has been declared deprecated and it will be deleted in future versions. This patch removes the support for the sysctl system call in SE mode (which is currently serviced calling the sysctl() function) if gem5 is built against glibc, keeping it with other libc implementations, as a temporary measure to prevent the generation of a compilation error. Note that this system call in gem5 is only supported for the arm/freebsd architecture. Change-Id: Ie5fcb983d15c0a27c7820d24250d7ae5dbe12355 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21519 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/freebsd/process.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/arm/freebsd/process.cc b/src/arch/arm/freebsd/process.cc
index 399da3a42..901b2411b 100644
--- a/src/arch/arm/freebsd/process.cc
+++ b/src/arch/arm/freebsd/process.cc
@@ -35,7 +35,9 @@
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/syscall.h>
+#if !defined ( __GNU_LIBRARY__ )
#include <sys/sysctl.h>
+#endif
#include <sys/types.h>
#include <utime.h>
@@ -90,6 +92,7 @@ issetugidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
return 0;
}
+#if !defined ( __GNU_LIBRARY__ )
static SyscallReturn
sysctlFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
{
@@ -133,6 +136,7 @@ sysctlFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
return (ret);
}
+#endif
static SyscallDesc syscallDescs32[] = {
/* 0 */ SyscallDesc("unused#000", unimplementedFunc),
@@ -888,7 +892,11 @@ static SyscallDesc syscallDescs64[] = {
/* 199 */ SyscallDesc("unused#199", unimplementedFunc),
/* 200 */ SyscallDesc("unused#200", unimplementedFunc),
/* 201 */ SyscallDesc("unused#201", unimplementedFunc),
+#if !defined ( __GNU_LIBRARY__ )
/* 202 */ SyscallDesc("sysctl", sysctlFunc),
+#else
+ /* 202 */ SyscallDesc("sysctl", unimplementedFunc),
+#endif
/* 203 */ SyscallDesc("unused#203", unimplementedFunc),
/* 204 */ SyscallDesc("unused#204", unimplementedFunc),
/* 205 */ SyscallDesc("unused#205", unimplementedFunc),