aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2020-11-03 19:12:33 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2020-11-03 19:12:33 +0000
commit7abf30d339336cef02a293352e0a82181e75c2fb (patch)
tree9d52ae3eee24913e21c4d1a42dc3ec5fbec51294
parent664eefe222da89f5bc1493ad8753ab96409e1b82 (diff)
downloadsrc-7abf30d339336cef02a293352e0a82181e75c2fb.tar.gz
src-7abf30d339336cef02a293352e0a82181e75c2fb.zip
Make linux_errtbl[] static.
MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27004
Notes
Notes: svn path=/head/; revision=367301
-rw-r--r--lib/libsysdecode/errno.c1
-rw-r--r--sys/compat/linux/linux_emul.h2
-rw-r--r--sys/compat/linux/linux_errno.inc2
-rw-r--r--sys/modules/linux_common/Makefile1
4 files changed, 1 insertions, 5 deletions
diff --git a/lib/libsysdecode/errno.c b/lib/libsysdecode/errno.c
index 037ad0380e4a..d66493ad739d 100644
--- a/lib/libsysdecode/errno.c
+++ b/lib/libsysdecode/errno.c
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
#include <compat/linux/linux_errno.h>
-static
#include <compat/linux/linux_errno.inc>
#endif
diff --git a/sys/compat/linux/linux_emul.h b/sys/compat/linux/linux_emul.h
index daa92e15b502..9104892885bc 100644
--- a/sys/compat/linux/linux_emul.h
+++ b/sys/compat/linux/linux_emul.h
@@ -80,6 +80,4 @@ struct linux_pemuldata {
struct linux_pemuldata *pem_find(struct proc *);
-extern const int linux_errtbl[];
-
#endif /* !_LINUX_EMUL_H_ */
diff --git a/sys/compat/linux/linux_errno.inc b/sys/compat/linux/linux_errno.inc
index c4a3fb0f56a4..d8c61e9d5ce1 100644
--- a/sys/compat/linux/linux_errno.inc
+++ b/sys/compat/linux/linux_errno.inc
@@ -38,7 +38,7 @@
* XXX: The "XXX" comments below should be replaced with rationale
* for the errno value chosen.
*/
-const int linux_errtbl[ELAST + 1] = {
+static const int linux_errtbl[ELAST + 1] = {
/* [0, 9] */
[0] = -0,
[EPERM] = -LINUX_EPERM,
diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile
index 5b49a7409997..70f22ef10bae 100644
--- a/sys/modules/linux_common/Makefile
+++ b/sys/modules/linux_common/Makefile
@@ -9,7 +9,6 @@ SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \
EXPORT_SYMS=
EXPORT_SYMS+= linux_emul_path
-EXPORT_SYMS+= linux_errtbl
EXPORT_SYMS+= linux_ioctl_register_handler
EXPORT_SYMS+= linux_ioctl_unregister_handler
EXPORT_SYMS+= linux_get_osname