Jerry James b08b3a
--- ./configure.in.orig	2014-09-06 20:00:00.000000000 -0600
Jerry James b08b3a
+++ ./configure.in	2014-09-06 20:00:00.000000000 -0600
Jerry James b08b3a
@@ -1435,9 +1435,11 @@ if test "$HAVE_SBRK" = "1" ; then
Jerry James e07871
 	AC_LANG_SOURCE([[
Jerry James e07871
 	        #include <stdio.h>
Jerry James e07871
 	        #include <stdlib.h>
Jerry James b08b3a
+		#define CAN_UNRANDOMIZE_SBRK 1
Jerry James b08b3a
+		#include "h/unrandomize.h"
Jerry James e07871
 		void gprof_cleanup() {}
Jerry James e07871
  		int main(int argc,char **argv,char **envp) {
Jerry James e07871
-		#include "h/unrandomize.h"
Jerry James b08b3a
+		UNRANDOMIZE_SBRK;
Jerry James e07871
 		return 0;}]])],
Jerry James e07871
 	[AC_MSG_RESULT(yes)
Jerry James e07871
 	AC_DEFINE(CAN_UNRANDOMIZE_SBRK,1,[can prevent sbrk from returning random values])],
Jerry James b08b3a
@@ -1447,12 +1449,11 @@ if test "$HAVE_SBRK" = "1" ; then
Jerry James e07871
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	            #include <stdio.h>
Jerry James e07871
 	            #include <stdlib.h>
Jerry James b08b3a
+		    #include "h/unrandomize.h"
Jerry James e07871
 		    void gprof_cleanup() {}
Jerry James e07871
 		    int main(int argc,char * argv[],char * envp[]) {
Jerry James e07871
 			FILE *f;
Jerry James e07871
-			#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-			#include "h/unrandomize.h"
Jerry James e07871
-			#endif
Jerry James e07871
+			UNRANDOMIZE_SBRK;
Jerry James e07871
 			if (!(f=fopen("conftest1","w"))) return -1;
Jerry James e07871
 			fprintf(f,"%u",sbrk(0));
Jerry James e07871
 			return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0)
Jerry James b08b3a
@@ -1462,12 +1463,11 @@ if test "$HAVE_SBRK" = "1" ; then
Jerry James e07871
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	            #include <stdio.h>
Jerry James e07871
 	            #include <stdlib.h>
Jerry James b08b3a
+		    #include "h/unrandomize.h"
Jerry James e07871
 		    void gprof_cleanup() {}
Jerry James e07871
 		    int main(int argc,char * argv[],char * envp[]) {
Jerry James e07871
 			FILE *f;
Jerry James e07871
-			#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-			#include "h/unrandomize.h"
Jerry James e07871
-			#endif
Jerry James e07871
+			UNRANDOMIZE_SBRK;
Jerry James e07871
 			if (!(f=fopen("conftest1","w"))) return -1;
Jerry James e07871
 			fprintf(f,"%u",sbrk(0));
Jerry James e07871
 			return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0)
Jerry James b08b3a
@@ -1539,6 +1539,7 @@ AC_MSG_CHECKING(CSTACK_ADDRESS)
Jerry James e07871
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void *
Jerry James e07871
 	foo() {
Jerry James e07871
 	      int i;
Jerry James b08b3a
@@ -1551,9 +1552,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
 	unsigned long i,j;
Jerry James e07871
 
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	j=1;
Jerry James e07871
 	j<<=$PAGEWIDTH;
Jerry James e07871
 	j<<=16;
Jerry James b08b3a
@@ -1573,6 +1572,7 @@ AC_MSG_CHECKING([cstack bits])
Jerry James e07871
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void *
Jerry James e07871
 	foo() {
Jerry James e07871
 	      int i;
Jerry James b08b3a
@@ -1585,9 +1585,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
 	unsigned long i,j;
Jerry James e07871
 
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	j=1;
Jerry James e07871
 	j<<=$PAGEWIDTH;
Jerry James e07871
 	j<<=16;
Jerry James b08b3a
@@ -1608,11 +1606,10 @@ AC_MSG_CHECKING(NEG_CSTACK_ADDRESS)
Jerry James e07871
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void gprof_cleanup() {}
Jerry James e07871
 	int main(int argc,char **argv,char **envp) {
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	return (long)$cstack_address<0 ? 0 : -1;
Jerry James e07871
 }]])],[AC_MSG_RESULT(yes)
Jerry James e07871
 	neg_cstack_address=1
Jerry James b08b3a
@@ -1625,14 +1622,13 @@ AC_MSG_CHECKING([finding CSTACK_ALIGNMEN
Jerry James e07871
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void gprof_cleanup() {}
Jerry James e07871
 	int main(int argc,char **argv,char **envp) {
Jerry James e07871
 	void *b,*c;
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
 	long n;
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	b=alloca(sizeof(b));
Jerry James e07871
 	c=alloca(sizeof(c));
Jerry James e07871
 	n=b>c ? b-c : c-b;
Jerry James b08b3a
@@ -1648,6 +1644,7 @@ AC_MSG_CHECKING(CSTACK_DIRECTION)
Jerry James e07871
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void *
Jerry James e07871
 	foo(void) {
Jerry James e07871
 	int i;
Jerry James b08b3a
@@ -1658,9 +1655,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
Jerry James e07871
 	int main(int argc,char **argv,char **envp) {
Jerry James e07871
 	char *b;
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	fprintf(fp,"%d",((long) &b) > ((long) foo()) ? -1 : 1);
Jerry James e07871
 	fclose(fp);
Jerry James e07871
 	return 0;
Jerry James b08b3a
--- ./configure.orig	2014-09-06 20:00:00.000000000 -0600
Jerry James b08b3a
+++ ./configure	2014-09-06 20:00:00.000000000 -0600
Jerry James b08b3a
@@ -7695,9 +7695,11 @@ else
Jerry James e07871
 
Jerry James e07871
 	        #include <stdio.h>
Jerry James e07871
 	        #include <stdlib.h>
Jerry James b08b3a
+		#define CAN_UNRANDOMIZE_SBRK 1
Jerry James b08b3a
+		#include "h/unrandomize.h"
Jerry James e07871
 		void gprof_cleanup() {}
Jerry James e07871
  		int main(int argc,char **argv,char **envp) {
Jerry James e07871
-		#include "h/unrandomize.h"
Jerry James b08b3a
+		UNRANDOMIZE_SBRK;
Jerry James e07871
 		return 0;}
Jerry James e07871
 _ACEOF
Jerry James e07871
 if ac_fn_c_try_run "$LINENO"; then :
Jerry James b08b3a
@@ -7725,12 +7727,11 @@ else
Jerry James e07871
 
Jerry James e07871
 	            #include <stdio.h>
Jerry James e07871
 	            #include <stdlib.h>
Jerry James b08b3a
+		    #include "h/unrandomize.h"
Jerry James e07871
 		    void gprof_cleanup() {}
Jerry James e07871
 		    int main(int argc,char * argv[],char * envp[]) {
Jerry James e07871
 			FILE *f;
Jerry James e07871
-			#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-			#include "h/unrandomize.h"
Jerry James e07871
-			#endif
Jerry James e07871
+			UNRANDOMIZE_SBRK;
Jerry James e07871
 			if (!(f=fopen("conftest1","w"))) return -1;
Jerry James e07871
 			fprintf(f,"%u",sbrk(0));
Jerry James e07871
 			return 0;}
Jerry James b08b3a
@@ -7755,12 +7756,11 @@ else
Jerry James e07871
 
Jerry James e07871
 	            #include <stdio.h>
Jerry James e07871
 	            #include <stdlib.h>
Jerry James b08b3a
+		    #include "h/unrandomize.h"
Jerry James e07871
 		    void gprof_cleanup() {}
Jerry James e07871
 		    int main(int argc,char * argv[],char * envp[]) {
Jerry James e07871
 			FILE *f;
Jerry James e07871
-			#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-			#include "h/unrandomize.h"
Jerry James e07871
-			#endif
Jerry James e07871
+			UNRANDOMIZE_SBRK;
Jerry James e07871
 			if (!(f=fopen("conftest1","w"))) return -1;
Jerry James e07871
 			fprintf(f,"%u",sbrk(0));
Jerry James e07871
 			return 0;}
Jerry James b08b3a
@@ -7814,6 +7814,7 @@ else
Jerry James e07871
 
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void *
Jerry James e07871
 	foo() {
Jerry James e07871
 	      int i;
Jerry James b08b3a
@@ -7826,9 +7827,7 @@ else
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
 	unsigned long i,j;
Jerry James e07871
 
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	j=1;
Jerry James e07871
 	j<<=$PAGEWIDTH;
Jerry James e07871
 	j<<=16;
Jerry James b08b3a
@@ -7872,6 +7871,7 @@ else
Jerry James e07871
 
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void *
Jerry James e07871
 	foo() {
Jerry James e07871
 	      int i;
Jerry James b08b3a
@@ -7884,9 +7884,7 @@ else
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
 	unsigned long i,j;
Jerry James e07871
 
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	j=1;
Jerry James e07871
 	j<<=$PAGEWIDTH;
Jerry James e07871
 	j<<=16;
Jerry James b08b3a
@@ -7931,11 +7929,10 @@ else
Jerry James e07871
 
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void gprof_cleanup() {}
Jerry James e07871
 	int main(int argc,char **argv,char **envp) {
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	return (long)$cstack_address<0 ? 0 : -1;
Jerry James e07871
 }
Jerry James e07871
 _ACEOF
Jerry James b08b3a
@@ -7970,14 +7967,13 @@ else
Jerry James e07871
 
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void gprof_cleanup() {}
Jerry James e07871
 	int main(int argc,char **argv,char **envp) {
Jerry James e07871
 	void *b,*c;
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
 	long n;
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	b=alloca(sizeof(b));
Jerry James e07871
 	c=alloca(sizeof(c));
Jerry James e07871
 	n=b>c ? b-c : c-b;
Jerry James b08b3a
@@ -8017,6 +8013,7 @@ else
Jerry James e07871
 
Jerry James e07871
 	#include <stdio.h>
Jerry James e07871
 	#include <stdlib.h>
Jerry James e07871
+	#include "h/unrandomize.h"
Jerry James e07871
 	void *
Jerry James e07871
 	foo(void) {
Jerry James e07871
 	int i;
Jerry James b08b3a
@@ -8027,9 +8024,7 @@ else
Jerry James e07871
 	int main(int argc,char **argv,char **envp) {
Jerry James e07871
 	char *b;
Jerry James e07871
 	FILE *fp = fopen("conftest1","w");
Jerry James e07871
-	#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
-	#include "h/unrandomize.h"
Jerry James e07871
-	#endif
Jerry James e07871
+	UNRANDOMIZE_SBRK;
Jerry James e07871
 	fprintf(fp,"%d",((long) &b) > ((long) foo()) ? -1 : 1);
Jerry James e07871
 	fclose(fp);
Jerry James e07871
 	return 0;
Jerry James b08b3a
--- ./h/unrandomize.h.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a
+++ ./h/unrandomize.h	2014-09-06 20:00:00.000000000 -0600
Jerry James e07871
@@ -1,3 +1,5 @@
Jerry James e07871
+#include <stdio.h>
Jerry James e07871
+#include <stdlib.h>
Jerry James e07871
 #include <sys/personality.h>
Jerry James e07871
 #include <syscall.h>
Jerry James e07871
 #include <unistd.h>
Jerry James b08b3a
@@ -5,61 +7,66 @@
Jerry James e07871
 #include <alloca.h>
Jerry James e07871
 #include <errno.h>
Jerry James e07871
 
Jerry James e07871
-{
Jerry James e07871
-  errno=0;
Jerry James e07871
-
Jerry James e07871
-  {
Jerry James e07871
-
Jerry James b08b3a
-    /*READ_IMPLIES_EXEC is for selinux, but selinux will reset it in the child*/
Jerry James b08b3a
-    long pers = personality(READ_IMPLIES_EXEC|personality(0xffffffffUL));
Jerry James e07871
-    long flag = ADDR_NO_RANDOMIZE;
Jerry James e07871
-
Jerry James e07871
-    if (sizeof(long)==4) flag|=ADDR_LIMIT_3GB|ADDR_COMPAT_LAYOUT;
Jerry James e07871
-
Jerry James e07871
-    if (pers==-1) {printf("personality failure %d\n",errno);exit(-1);}
Jerry James e07871
-    if ((pers & flag)!=flag && !getenv("GCL_UNRANDOMIZE")) {
Jerry James e07871
-      errno=0;
Jerry James e07871
-      if (personality(pers | flag) != -1 && (personality(0xffffffffUL) & flag)==flag) {
Jerry James e07871
-	int i,j,k;
Jerry James e07871
-	char **n,**a;
Jerry James e07871
-	void *v;
Jerry James e07871
-	for (i=j=0;argv[i];i++)
Jerry James e07871
-	  j+=strlen(argv[i])+1;
Jerry James e07871
-	for (k=0;envp[k];k++)
Jerry James e07871
-	  j+=strlen(envp[k])+1;
Jerry James e07871
-	j+=(i+k+3)*sizeof(char *);
Jerry James e07871
-	if ((v=sbrk(j))==(void *)-1) {
Jerry James e07871
-	  printf("Cannot brk environment space\n");
Jerry James e07871
-	  exit(-1);
Jerry James e07871
-	}
Jerry James e07871
-	a=v;
Jerry James e07871
-	v=a+i+1;
Jerry James e07871
-	n=v;
Jerry James e07871
-	v=n+k+2;
Jerry James e07871
-	for (i=0;argv[i];i++) {
Jerry James e07871
-	  a[i]=v;
Jerry James e07871
-	  strcpy(v,argv[i]);
Jerry James e07871
-	  v+=strlen(v)+1;
Jerry James e07871
-	}
Jerry James e07871
-	a[i]=0;
Jerry James e07871
-	for (k=0;envp[k];k++) {
Jerry James e07871
-	  n[k]=v;
Jerry James e07871
-	  strcpy(v,envp[k]);
Jerry James e07871
-	  v+=strlen(v)+1;
Jerry James e07871
-	}
Jerry James e07871
-	n[k]="GCL_UNRANDOMIZE=t";
Jerry James e07871
-	n[k+1]=0;
Jerry James e07871
-#ifdef GCL_GPROF
Jerry James e07871
-	gprof_cleanup();
Jerry James e07871
+#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James e07871
+# ifdef GCL_GPROF
Jerry James e07871
+#  define GPROF_CLEANUP gprof_cleanup()
Jerry James e07871
+# else
Jerry James e07871
+#  define GPROF_CLEANUP
Jerry James e07871
+# endif
Jerry James e07871
+# define UNRANDOMIZE_SBRK do {						\
Jerry James e07871
+  errno=0;								\
Jerry James e07871
+  {									\
Jerry James b08b3a
+    /*READ_IMPLIES_EXEC is for selinux, but selinux will reset it in the child*/ \
Jerry James e07871
+    long pers = personality(0xffffffffUL);				\
Jerry James e07871
+    long flag = ADDR_NO_RANDOMIZE;					\
Jerry James e07871
+									\
Jerry James e07871
+    if (sizeof(long)==4) flag|=ADDR_LIMIT_3GB|ADDR_COMPAT_LAYOUT;	\
Jerry James e07871
+									\
Jerry James e07871
+    if (pers==-1) {printf("personality failure %d\n",errno);exit(-1);}	\
Jerry James e07871
+    if ((pers & flag)!=flag && !getenv("GCL_UNRANDOMIZE")) {		\
Jerry James e07871
+      errno=0;								\
Jerry James e07871
+      if (personality(pers | flag) != -1 && (personality(0xffffffffUL) & flag)==flag) { \
Jerry James e07871
+	int i,j,k;							\
Jerry James e07871
+	char **n,**a;							\
Jerry James e07871
+	void *v;							\
Jerry James e07871
+	for (i=j=0;argv[i];i++)						\
Jerry James e07871
+	  j+=strlen(argv[i])+1;						\
Jerry James e07871
+	for (k=0;envp[k];k++)						\
Jerry James e07871
+	  j+=strlen(envp[k])+1;						\
Jerry James e07871
+	j+=(i+k+3)*sizeof(char *);					\
Jerry James e07871
+	if ((v=sbrk(j))==(void *)-1) {					\
Jerry James e07871
+	  printf("Cannot brk environment space\n");			\
Jerry James e07871
+	  exit(-1);							\
Jerry James e07871
+	}								\
Jerry James e07871
+	a=v;								\
Jerry James e07871
+	v=a+i+1;							\
Jerry James e07871
+	n=v;								\
Jerry James e07871
+	v=n+k+2;							\
Jerry James e07871
+	for (i=0;argv[i];i++) {						\
Jerry James e07871
+	  a[i]=v;							\
Jerry James e07871
+	  strcpy(v,argv[i]);						\
Jerry James e07871
+	  v+=strlen(v)+1;						\
Jerry James e07871
+	}								\
Jerry James e07871
+	a[i]=0;								\
Jerry James e07871
+	for (k=0;envp[k];k++) {						\
Jerry James e07871
+	  n[k]=v;							\
Jerry James e07871
+	  strcpy(v,envp[k]);						\
Jerry James e07871
+	  v+=strlen(v)+1;						\
Jerry James e07871
+	}								\
Jerry James e07871
+	n[k]="GCL_UNRANDOMIZE=t";					\
Jerry James e07871
+	n[k+1]=0;							\
Jerry James e07871
+	GPROF_CLEANUP;							\
Jerry James e07871
+	errno=0;							\
Jerry James e07871
+	execve(*a,a,n);							\
Jerry James e07871
+	printf("execve failure %d\n",errno);				\
Jerry James e07871
+	exit(-1);							\
Jerry James e07871
+      } else {								\
Jerry James e07871
+	printf("personality change failure %d\n",errno);		\
Jerry James e07871
+	exit(-1);							\
Jerry James e07871
+      }									\
Jerry James e07871
+    }									\
Jerry James e07871
+  }									\
Jerry James e07871
+} while (0)
Jerry James e07871
+#else
Jerry James e07871
+# define UNRANDOMIZE_SBRK
Jerry James e07871
 #endif
Jerry James e07871
-	errno=0;
Jerry James e07871
-	execve(*a,a,n);
Jerry James e07871
-	printf("execve failure %d\n",errno);
Jerry James e07871
-	exit(-1);
Jerry James e07871
-      } else {
Jerry James e07871
-	printf("personality change failure %d\n",errno);
Jerry James e07871
-	exit(-1);
Jerry James e07871
-      }
Jerry James e07871
-    }
Jerry James e07871
-  }
Jerry James e07871
-}
Jerry James b08b3a
--- ./o/main.c.orig	2014-09-06 09:45:30.000000000 -0600
Jerry James b08b3a
+++ ./o/main.c	2014-09-06 20:00:00.000000000 -0600
Jerry James b08b3a
@@ -50,6 +50,7 @@ void initialize_process();
Jerry James b08b3a
 #include "include.h"
Jerry James b08b3a
 #include <signal.h>
Jerry James b08b3a
 #include "page.h"
Jerry James b08b3a
+#include "unrandomize.h"
Jerry James b08b3a
 
Jerry James b08b3a
 bool saving_system=FALSE;
Jerry James b08b3a
 
Jerry James b08b3a
@@ -357,11 +358,7 @@ main(int argc, char **argv, char **envp)
Jerry James b08b3a
 
Jerry James b08b3a
   gcl_init_alloc(&argv);
Jerry James b08b3a
 
Jerry James b08b3a
-#ifdef CAN_UNRANDOMIZE_SBRK
Jerry James b08b3a
-#include <stdio.h>
Jerry James b08b3a
-#include <stdlib.h>
Jerry James b08b3a
-#include "unrandomize.h"
Jerry James b08b3a
-#endif
Jerry James b08b3a
+  UNRANDOMIZE_SBRK;
Jerry James b08b3a
   
Jerry James b08b3a
 #ifdef LD_BIND_NOW
Jerry James b08b3a
 #include <stdio.h>