Skip to contentSkip to conversation

timer in vl.c

Qemu-devel Maarten Boekhold 1 participant 1 message Jun 8, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm trying to port qemu so it compiles on cygwin, and I'm having a bit of trouble with vl.c.

vl.c defines start_rtc_timer() and init_timers(). If I read it correctly, the code says something like (only put code that I believe is relevant to this question down below):

#ifndef _WIN32
#if defined (__linux__)
static int rtc_fd
static int start_rtc_timer(void) {
...
}
#else
static int start_rtc_timer(void) { return -1;}
#endif
#endif

static void init_timers(void) {
#ifdef _WIN32
...
#else
/* here rtc_fd is referenced */
#endif
}

How does this work when you try to compile on a BSD platform? On such a platform, rtc_fd won't be defined, yet the code that references it will be compiled, no?

CVS from june 7

Maarten