31 lines
933 B
Diff
31 lines
933 B
Diff
--- librtas-1.2.4/librtas_src/syscall_calls.c.no_syscall 2006-08-01 10:08:03.000000000 -0400
|
|
+++ librtas-1.2.4/librtas_src/syscall_calls.c 2006-08-01 10:09:22.000000000 -0400
|
|
@@ -93,7 +93,15 @@
|
|
.interface_exists = sc_interface_exists,
|
|
};
|
|
|
|
+/* The original librtas used the _syscall1 interface to get to the rtas
|
|
+ * system call. On recent versions of Linux though the _syscall1
|
|
+ * interface was removed from unistd.h so we have moved to using the
|
|
+ * syscall() interface instead. The use of _syscall1 is left as the
|
|
+ * default to avoid breaking the library on older systems.
|
|
+ */
|
|
+#ifdef _syscall1
|
|
_syscall1(int, rtas, void *, args);
|
|
+#endif
|
|
|
|
#define CALL_AGAIN 1
|
|
|
|
@@ -201,7 +209,11 @@
|
|
va_end(ap);
|
|
|
|
display_rtas_buf(&args, 0);
|
|
+#ifdef _syscall1
|
|
rc = rtas(&args);
|
|
+#else
|
|
+ rc = syscall(__NR_rtas, &args);
|
|
+#endif
|
|
if (rc != 0) {
|
|
dbg1("RTAS syscall failure, errno=%d\n", errno);
|
|
return RTAS_IO_ASSERT;
|