Commit 829309c70c47926cb1c05727118ebe77c417eecc

Authored by bellard
1 parent c6a1c22b

BSD fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@831 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 13 additions and 9 deletions
... ... @@ -739,10 +739,12 @@ static void host_alarm_handler(int host_signum)
739 739  
740 740 #ifndef _WIN32
741 741  
  742 +#if defined(__linux__)
  743 +
742 744 #define RTC_FREQ 1024
743 745  
744 746 static int rtc_fd;
745   -
  747 +
746 748 static int start_rtc_timer(void)
747 749 {
748 750 rtc_fd = open("/dev/rtc", O_RDONLY);
... ... @@ -763,7 +765,16 @@ static int start_rtc_timer(void)
763 765 return 0;
764 766 }
765 767  
766   -#endif
  768 +#else
  769 +
  770 +static int start_rtc_timer(void)
  771 +{
  772 + return -1;
  773 +}
  774 +
  775 +#endif /* !defined(__linux__) */
  776 +
  777 +#endif /* !defined(_WIN32) */
767 778  
768 779 static void init_timers(void)
769 780 {
... ...
... ... @@ -50,13 +50,6 @@
50 50  
51 51 #include "cpu.h"
52 52  
53   -#ifdef _BSD
54   -#define lseek64 lseek
55   -#define ftruncate64 ftruncate
56   -#define mkstemp64 mkstemp
57   -#define MAP_ANONYMOUS MAP_ANON
58   -#endif
59   -
60 53 #ifndef glue
61 54 #define xglue(x, y) x ## y
62 55 #define glue(x, y) xglue(x, y)
... ...