From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BPeUY-0001uJ-EU for qemu-devel@nongnu.org; Mon, 17 May 2004 05:33:02 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BPeU1-0001oR-73 for qemu-devel@nongnu.org; Mon, 17 May 2004 05:33:01 -0400 Received: from [195.9.147.9] (helo=dionis.simtreas.ru) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPeU0-0001nu-8V for qemu-devel@nongnu.org; Mon, 17 May 2004 05:32:28 -0400 Received: from simtreas.ru (IDENT:1000@dzo.ufk.ufk68.minfin.ru [10.68.0.2]) by dionis.simtreas.ru (8.9.3/8.9.3) with ESMTP id NAA31312 for ; Mon, 17 May 2004 13:32:26 +0400 Message-ID: <40A88730.6000208@simtreas.ru> Date: Mon, 17 May 2004 13:34:40 +0400 From: "Vladimir N. Oleynik" MIME-Version: 1.0 References: <200405161546.i4GFkHOR031617@treas.simtreas.ru> In-Reply-To: <200405161546.i4GFkHOR031617@treas.simtreas.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] portable to old compiler and kernel Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi. I make qemu 0.5.5 with egcs and kernel 2.2.X with changes: 1) target-i386.c have duplicate initialize (egcs stoped with errors): [INDEX_op_cmpxchgb_T0_T1_EAX_cc] = CC_OSZAPC, [INDEX_op_cmpxchgw_T0_T1_EAX_cc] = CC_OSZAPC, [INDEX_op_cmpxchgl_T0_T1_EAX_cc] = CC_OSZAPC, and with generate from DEF_WRITEF( ) 2) oss.c, hw/ dma.c fdc.c sb16.c change macros #define lwarn(...) #define linfo(...) #define ldebug(...) to #define lwarn(...) #define linfo(args...) #define ldebug(args...) 3) hw/fdc.c #define FLOPPY_ERROR(fmt, args...) \ do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ##args); } while (0) to #define FLOPPY_ERROR(fmt, args...) \ do { printf("FLOPPY ERROR: %s: " fmt, __FUNCTION__ , ##args); } while (0) 4) my glibc have declaration with "int" type from signal.h, I unset from vl.c //extern void __sigaction(); My kernel 2.2.X dont have linux/if_tun.h I make new preprocessor CONFIG_IF_TUN option and change vl.c #ifdef CONFIG_IF_TUN #include #endif and static int tun_open(char *ifname, int ifname_size) { #if CONFIG_IF_TUN struct ifreq ifr; int fd, ret; fd = open("/dev/net/tun", O_RDWR); if (fd < 0) { fprintf(stderr, "warning: could not open /dev/net/tun: no virtual network emulation\n"); return -1; } memset(&ifr, 0, sizeof(ifr)); ifr.ifr_flags = IFF_TAP | IFF_NO_PI; pstrcpy(ifr.ifr_name, IFNAMSIZ, "tun%d"); ret = ioctl(fd, TUNSETIFF, (void *) &ifr); if (ret != 0) { close(fd); #endif fprintf(stderr, "warning: could not configure /dev/net/tun: no virtual network emulation\n"); return -1; #if CONFIG_IF_TUN } printf("Connected to host network interface: %s\n", ifr.ifr_name); pstrcpy(ifname, ifname_size, ifr.ifr_name); fcntl(fd, F_SETFL, O_NONBLOCK); return fd; #endif } Its works now. --w vodz