diff --git a/libsndio/siomix_sun.c b/libsndio/siomix_sun.c index c1931d1..066fe8a 100644 --- a/libsndio/siomix_sun.c +++ b/libsndio/siomix_sun.c @@ -270,7 +270,7 @@ scanvol(struct siomix_sun_hdl *hdl, struct wskbd_vol *vol) return 1; } -static int +int siomix_sun_getfd(const char *str, unsigned int mode, int nbio) { const char *p; @@ -278,6 +278,9 @@ siomix_sun_getfd(const char *str, unsigned int mode, int nbio) unsigned int devnum; int fd, flags; +#ifdef DEBUG + _sndio_debug_init(); +#endif p = _sndio_parsetype(str, "rsnd"); if (p == NULL) { DPRINTF("siomix_sun_getfd: %s: \"rsnd\" expected\n", str); @@ -310,11 +313,14 @@ siomix_sun_getfd(const char *str, unsigned int mode, int nbio) return fd; } -static struct siomix_hdl * +struct siomix_hdl * siomix_sun_fdopen(int fd, unsigned int mode, int nbio) { struct siomix_sun_hdl *hdl; +#ifdef DEBUG + _sndio_debug_init(); +#endif hdl = malloc(sizeof(struct siomix_sun_hdl)); if (hdl == NULL) return NULL; diff --git a/libsndio/sndio.h b/libsndio/sndio.h index afbc202..0c0d89b 100644 --- a/libsndio/sndio.h +++ b/libsndio/sndio.h @@ -195,6 +195,8 @@ int mio_rmidi_getfd(const char *, unsigned int, int); struct mio_hdl *mio_rmidi_fdopen(int, unsigned int, int); int sio_sun_getfd(const char *, unsigned int, int); struct sio_hdl *sio_sun_fdopen(int, unsigned int, int); +int siomix_sun_getfd(const char *, unsigned int, int); +struct siomix_hdl *siomix_sun_fdopen(int, unsigned int, int); #ifdef __cplusplus }