Re: freeBSD and Complieation Error

From: Shigechika AIKAWA <shige@dont-contact.us>
Date: Thu, 01 Jun 2000 11:24:31 +0900

Hello

From: "Ahsan Khan" <ahsank@one.net.pk>
Subject: freeBSD and Complieation Error
Date: Thu, 1 Jun 2000 04:09:04 +0500

> gcc -g -Wall -I../include -I../include -c dlmalloc.c
> dlmalloc.c:796: conflicting types for `sbrk'
> /usr/include/unistd.h:179: previous declaration of `sbrk'
> *** Error code 1

I am using BSD/OS. But above error can watch on BSD/OS, too.

I use the following patch every release. On FreeBSD, you need to
replace `__bsdi__' to `__FreeBSD__'.

Thank you.

--- dlmalloc.c~ Thu Sep 24 02:16:10 1998
+++ dlmalloc.c Mon May 22 02:52:12 2000
@@ -793,7 +793,9 @@
 #else /* INTERNAL_LINUX_C_LIB */
 
 #if __STD_C
+# ifndef __bsdi__
 extern Void_t* sbrk(ptrdiff_t);
+# endif
 #else
 extern Void_t* sbrk();
 #endif

--
Shigechika AIKAWA shige@cin.nihon-u.ac.jp
Received on Wed May 31 2000 - 20:29:37 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:53:44 MST