rpms/librtas/devel librtas-1.2.4-no_syscall1.patch, NONE, 1.1 librtas.spec, 1.6, 1.7

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Aug 1 14:28:26 UTC 2006


Author: pnasrat

Update of /cvs/dist/rpms/librtas/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv2797

Modified Files:
	librtas.spec 
Added Files:
	librtas-1.2.4-no_syscall1.patch 
Log Message:
Fix build

librtas-1.2.4-no_syscall1.patch:
 syscall_calls.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

--- NEW FILE librtas-1.2.4-no_syscall1.patch ---
--- 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;


Index: librtas.spec
===================================================================
RCS file: /cvs/dist/rpms/librtas/devel/librtas.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- librtas.spec	12 Jul 2006 06:55:46 -0000	1.6
+++ librtas.spec	1 Aug 2006 14:28:23 -0000	1.7
@@ -1,11 +1,12 @@
 Summary: Libraries to provide access to RTAS calls and RTAS events.
 Name: librtas
 Version: 1.2.4
-Release: 1.2.2
+Release: 2
 URL: http://librtas.ozlabs.org
 License: IBM Common Public License (CPL) v1.0
 Group: System Environment/Libraries
 Source: librtas-src-1.2.4.tar.gz
+Patch0: librtas-1.2.4-no_syscall1.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 ExclusiveArch: ppc ppc64
@@ -32,6 +33,7 @@
 
 %prep
 %setup 
+%patch0 -p1 -b .no_syscall
 
 %build
 make CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC"
@@ -62,6 +64,9 @@
 /usr/include/*
 
 %changelog
+* Tue Aug 01 2006 Paul Nasrat <pnasrat at redhat.com> - 1.2.4-2
+- Backport syscall fix from upstream 
+
 * Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 1.2.4-1.2.2
 - rebuild
 




More information about the fedora-cvs-commits mailing list