From: "Vladimir N. Oleynik" <dzo@simtreas.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] portable to old compiler and kernel
Date: Mon, 17 May 2004 13:34:40 +0400 [thread overview]
Message-ID: <40A88730.6000208@simtreas.ru> (raw)
In-Reply-To: <200405161546.i4GFkHOR031617@treas.simtreas.ru>
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 <linux/if_tun.h>
#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
next prev parent reply other threads:[~2004-05-17 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200405161546.i4GFkHOR031617@treas.simtreas.ru>
2004-05-17 9:14 ` [Qemu-devel] vl.c -EAGAIN Vladimir N. Oleynik
2004-05-17 9:34 ` Vladimir N. Oleynik [this message]
2004-05-17 11:17 ` [Qemu-devel] portable to old compiler and kernel J. Mayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40A88730.6000208@simtreas.ru \
--to=dzo@simtreas.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.