dietlibc/dietlibc-0.29-scall.patch
2009-03-01 12:42:34 +00:00

32 lines
925 B
Diff

From 5dc478088a3358ba32ae2b4c104735eb966b62d1 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:50:24 +0200
Subject: [PATCH] Sanity checks for syscall availability
Catch the case when syscall(2) is not implemented for the actual arch
instead of jumping to the next function and executing the wrong code
---
libcompat/syscall.S | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/libcompat/syscall.S b/libcompat/syscall.S
index c9f72bb..4188167 100644
--- a/libcompat/syscall.S
+++ b/libcompat/syscall.S
@@ -130,6 +130,12 @@ syscall:
b __unified_syscall
#else
- /* arch not implemented yet */
+#include <endian.h>
+ .section .comment
+#if (__WORDSIZE == 64)
+ .quad __syscall_2_not_implemented_for_this_arch
+#else
+ .long __syscall_2_not_implemented_for_this_arch
+#endif
#endif
.size syscall, . - syscall
--
1.6.0.6