To: vgoel@dis.ist.ucf.edu (Vineet Goel) Reply-To: tcpdump@ee.lbl.gov Cc: tcpdump@ee.lbl.gov In-reply-to: Your message of Tue, 28 Jun 94 12:12:11 EDT. Date: Wed, 31 Aug 94 22:42:26 PDT From: Craig Leres > I am compiling tcpdump-3.0 on Sunos-4.1.2. It gives following error: [...] > os.h:61: conflicting types for `malloc' > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.5.8/include/stdlib.h:38: previous declaration of `malloc' > os.h:68: conflicting types for `read' > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.5.8/include/unistd.h:120: previous declaration of `read' > tcpdump.c: In function `lookup_printer': It looks like gcc 2 has changed the prototypes for malloc() and read(). Please try the appended patch. Craig ------ *** os-sunos4.h.virgin Wed Aug 31 16:25:39 1994 --- os-sunos4.h Wed Aug 31 16:39:46 1994 *************** *** 58,64 **** --- 58,66 ---- int ioctl(int, int, caddr_t); off_t lseek(int, off_t, int); #ifdef __GNUC__ + #if __GNUC__ == 1 void *malloc(u_int); + #endif #else char *malloc(u_int); #endif *************** *** 65,71 **** --- 67,75 ---- void perror(const char *); int printf(const char *, ...); int puts(const char *); + #if __GNUC__ <= 1 int read(int, char *, u_int); + #endif int setlinebuf(FILE *); int socket(int, int, int); int sscanf(char *, const char *, ...);