[klibc] [PATCH klibc 5/5] syscalls: Override detection of direct socket syscalls on i386, m68k, s390

Ben Hutchings ben at decadent.org.uk
Tue Jan 5 16:46:14 PST 2016


The direct socket syscalls are now implemented on i386, m68k and s390,
making socketcall() obsolete.  We avoid using them immediately since
this will break compatibility with Linux < 4.3.

Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
Some sort of fix is needed here as otherwise we'll build two
copies of the socket system call wrappers.  In Debian we do need
to retain compatibility back to 3.16 for the time being.

Ben.

 usr/include/arch/i386/klibc/archconfig.h | 3 +++
 usr/include/arch/m68k/klibc/archconfig.h | 3 +++
 usr/include/arch/s390/klibc/archconfig.h | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/usr/include/arch/i386/klibc/archconfig.h b/usr/include/arch/i386/klibc/archconfig.h
index f070f5b..6951f96 100644
--- a/usr/include/arch/i386/klibc/archconfig.h
+++ b/usr/include/arch/i386/klibc/archconfig.h
@@ -15,4 +15,7 @@
 /* We have klibc/archinit.h and __libc_archinit() */
 #define _KLIBC_HAS_ARCHINIT 1
 
+/* Use sys_socketcall unconditionally */
+#define _KLIBC_SYS_SOCKETCALL 1
+
 #endif				/* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/include/arch/m68k/klibc/archconfig.h b/usr/include/arch/m68k/klibc/archconfig.h
index 10ef62e..1d5c034 100644
--- a/usr/include/arch/m68k/klibc/archconfig.h
+++ b/usr/include/arch/m68k/klibc/archconfig.h
@@ -12,4 +12,7 @@
 /* On m68k, sys_mmap2 uses the current page size as the shift factor */
 #define _KLIBC_MMAP2_SHIFT	__getpageshift()
 
+/* Use sys_socketcall unconditionally */
+#define _KLIBC_SYS_SOCKETCALL 1
+
 #endif				/* _KLIBC_ARCHCONFIG_H */
diff --git a/usr/include/arch/s390/klibc/archconfig.h b/usr/include/arch/s390/klibc/archconfig.h
index d7a71a4..18d30da 100644
--- a/usr/include/arch/s390/klibc/archconfig.h
+++ b/usr/include/arch/s390/klibc/archconfig.h
@@ -12,4 +12,7 @@
 /* Both s390 and s390x use the "32-bit" version of this structure */
 #define _KLIBC_STATFS_F_TYPE_64 0
 
+/* Use sys_socketcall unconditionally */
+#define _KLIBC_SYS_SOCKETCALL 1
+
 #endif				/* _KLIBC_ARCHCONFIG_H */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <http://www.zytor.com/pipermail/klibc/attachments/20160106/af03a9cf/attachment.sig>


More information about the klibc mailing list