clisp/clisp-2.49-personality.patch

28 lines
755 B
Diff

--- src/_clisp.c
+++ src/_clisp.c 2010-07-14 13:14:48.983463701 +0000
@@ -46,6 +46,11 @@
/* Declare stderr, perror(). */
# include <stdio.h>
+#if defined(HAS_PERSONALITY) && (HAS_PERSONALITY > 0)
+/* Declare syscall, PER_LINUX32. */
+# include <sys/personality.h>
+#endif
+
#if defined(WIN32_NATIVE)
# include <windows.h>
int shell_quote (char * dest, const char * source);
@@ -417,6 +422,12 @@ int main (int argc, char* argv[])
return 1;
}
#else
+#if defined(HAS_PERSONALITY) && (HAS_PERSONALITY > 0)
+ if (personality(PER_LINUX32)) {
+ perror(program_name);
+ return 1;
+ }
+#endif /* FEDORA */
execv(executable,new_argv);
{ /* execv() returns only if there was an error. */
int saved_errno = errno;