Changeset 3490:170391ca4c93 in roaraudio for libroarpulse


Ignore:
Timestamp:
02/14/10 18:20:35 (10 years ago)
Author:
phi
Branch:
default
Message:

some workarounds for poll() on non-poll()-enabled systems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/mainloop.c

    r3483 r3490  
    3838 
    3939#include <libroarpulse/libroarpulse.h> 
     40#ifdef ROAR_HAVE_H_POLL 
    4041#include <poll.h> 
     42#endif 
    4143 
    4244#define MAX_IO_EVENTS    8 
     45 
     46#ifndef ROAR_HAVE_H_POLL 
     47struct pollfd { 
     48 int fd; 
     49 short events, revents; 
     50}; 
     51#endif 
    4352 
    4453struct pa_io_event { 
     
    233242   ret = m->poll_func(m->pollfd, m->pollfds, m->poll_timeout, m->poll_userdata); 
    234243  } else { 
     244#ifdef ROAR_HAVE_H_POLL 
    235245   ret = poll(m->pollfd, m->pollfds, m->poll_timeout); 
     246#else 
     247   ret = -1; 
     248#endif 
    236249  } 
    237250 
Note: See TracChangeset for help on using the changeset viewer.