diff src/unexfreebsd.c @ 274:ca9a9ec9c1c1 r21-0b35

Import from CVS: tag r21-0b35
author cvs
date Mon, 13 Aug 2007 10:29:42 +0200
parents 084402c475ba
children 74fd4e045ea6
line wrap: on
line diff
--- a/src/unexfreebsd.c	Mon Aug 13 10:28:54 2007 +0200
+++ b/src/unexfreebsd.c	Mon Aug 13 10:29:42 2007 +0200
@@ -680,6 +680,7 @@
 {
       unsigned long current_sbrk = (unsigned long) sbrk (0);
 
+#if __FreeBSD_version < 300000 /* 2.x can work with this code */
       if (sbrk_of_0_at_unexec < current_sbrk)
 	{
 	  if (sbrk_of_0_at_unexec != 0)
@@ -687,6 +688,8 @@
 		     sbrk_of_0_at_unexec, current_sbrk);
 	}
       else
+#endif
+	if (sbrk_of_0_at_unexec > current_sbrk)
         {
           errno = 0;
           if (brk ((caddr_t) sbrk_of_0_at_unexec))