This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

_syscall2 vs MAX_ERRNO


Hi,

On new (FC6) x86_64 (2.6.19 kernel) systems when you try to import
linux/unistd.h to get a definition of _syscall2 it is defined in terms
that use MAX_ERRNO. Unfortunately this constant isn't anywhere defined
in a user visible header as far as I can tell. So for now I have
installed the following patch to get things compiling again.

2007-01-23  Mark Wielaard  <mark@klomp.org>

       * include/linux.syscall.h: Define MAX_ERRNO if not yet defined.

Hints and tips for a real solution appreciated.

Cheers,

Mark
? max_errno.patch
Index: include/linux.syscall.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/include/linux.syscall.h,v
retrieving revision 1.4
diff -u -r1.4 linux.syscall.h
--- include/linux.syscall.h	4 Sep 2006 13:06:57 -0000	1.4
+++ include/linux.syscall.h	23 Jan 2007 11:42:30 -0000
@@ -43,6 +43,13 @@
 #include <errno.h>
 #include <linux/unistd.h>
 
+/* If linux/unistd.h defines _syscall2 then it might refer to MAX_ERRNO
+ * which might not be defined anywhere (at least it does so on x86_64).
+ */
+#ifndef MAX_ERRNO
+#define MAX_ERRNO 4095
+#endif
+
 /* Declares syscall() */
 #include <unistd.h>
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]