File sbcl-1.1.4-personality.patch of Package sbcl

---
 src/runtime/linux-os.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/src/runtime/linux-os.c
+++ b/src/runtime/linux-os.c
@@ -46,7 +46,10 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <linux/version.h>
-
+/* use for personality part
+ * as done in fedora packages
+ */
+#include <sys/personality.h>
 #include "validate.h"
 #include "thread.h"
 #include "gc.h"
@@ -284,6 +287,10 @@ os_init(char *argv[], char *envp[])
                 if (i != -1) {
                     runtime[i] = '\0';
                     execve(runtime, argv, envp);
+                } else {
+                    /* if /proc isn't available (like in chroot builds, like mock),
+                     * try using execvp with argv[0] instead */
+                    execvp(argv[0], argv);
                 }
             }
             /* Either changing the personality or execve() failed. Either
openSUSE Build Service is sponsored by