mirror of https://github.com/ericonr/sndio.git
Make *_getfd() and *_fdopen() public.
This allows pledged sndiod to build with the portable library.
This commit is contained in:
parent
56f1183e78
commit
7e19ef6644
|
@ -135,11 +135,14 @@ mio_rmidi_getfd(const char *str, unsigned int mode, int nbio)
|
|||
return fd;
|
||||
}
|
||||
|
||||
static struct mio_hdl *
|
||||
struct mio_hdl *
|
||||
mio_rmidi_fdopen(int fd, unsigned int mode, int nbio)
|
||||
{
|
||||
struct mio_rmidi_hdl *hdl;
|
||||
|
||||
#ifdef DEBUG
|
||||
_sndio_debug_init();
|
||||
#endif
|
||||
hdl = malloc(sizeof(struct mio_rmidi_hdl));
|
||||
if (hdl == NULL)
|
||||
return NULL;
|
||||
|
|
|
@ -267,7 +267,7 @@ sio_sun_getcap(struct sio_hdl *sh, struct sio_cap *cap)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
sio_sun_getfd(const char *str, unsigned int mode, int nbio)
|
||||
{
|
||||
const char *p;
|
||||
|
@ -275,6 +275,9 @@ sio_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("sio_sun_getfd: %s: \"rsnd\" expected\n", str);
|
||||
|
@ -307,11 +310,14 @@ sio_sun_getfd(const char *str, unsigned int mode, int nbio)
|
|||
return fd;
|
||||
}
|
||||
|
||||
static struct sio_hdl *
|
||||
struct sio_hdl *
|
||||
sio_sun_fdopen(int fd, unsigned int mode, int nbio)
|
||||
{
|
||||
struct sio_sun_hdl *hdl;
|
||||
|
||||
#ifdef DEBUG
|
||||
_sndio_debug_init();
|
||||
#endif
|
||||
hdl = malloc(sizeof(struct sio_sun_hdl));
|
||||
if (hdl == NULL)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue