Changeset 5493:ed802d14a722 in roaraudio for plugins


Ignore:
Timestamp:
05/05/12 12:40:38 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

test for needed functions, not just fail on OpenBSD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/roard/listenpty.c

    r5434 r5493  
    2525 
    2626#include <roard/include/roard.h> 
     27 
     28#if defined(ROAR_HAVE_POSIX_OPENPT) && defined(ROAR_HAVE_GRANTPT) && defined(ROAR_HAVE_UNLOCKPT) && defined(ROAR_HAVE_TCGETATTR) && defined(ROAR_HAVE_TCSETATTR) && defined(ROAR_HAVE_CFMAKERAW) 
     29#define __HAVE_SUPPORT 
     30#endif 
     31 
     32#ifdef __HAVE_SUPPORT 
    2733#include <termios.h> 
     34#endif 
    2835 
    2936static int init  (struct roar_dl_librarypara * para) { 
     37#ifdef __HAVE_SUPPORT 
    3038 int serverfh = posix_openpt(O_RDWR|O_NOCTTY); 
    3139 struct termios termios; 
     
    5260 ROAR_WARN("PTY Slave: %s", ptsname(serverfh)); 
    5361 return 0; 
     62#else 
     63 ROAR_ERR("No PTY Support found so can not load listenpty plugin."); 
     64 return -1; 
     65#endif 
    5466} 
    5567 
Note: See TracChangeset for help on using the changeset viewer.