diff options
author | 2015-11-24 11:03:18 +0000 | |
---|---|---|
committer | 2015-11-24 11:03:18 +0000 | |
commit | 6dcfe4ec9fc225bf645caaf9d68180666b71a5f3 (patch) | |
tree | 118c0ee183b7e18425a944c320f5e880451c3421 | |
parent | Turn on filename tab completion in vi by default. (diff) | |
download | wireguard-openbsd-6dcfe4ec9fc225bf645caaf9d68180666b71a5f3.tar.xz wireguard-openbsd-6dcfe4ec9fc225bf645caaf9d68180666b71a5f3.zip |
Fix confusion between SIO_xxx and MIO_xxx options (copy & paste error).
-rw-r--r-- | lib/libsndio/mio_rmidi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libsndio/mio_rmidi.c b/lib/libsndio/mio_rmidi.c index 43fef7c4af7..350e4bc9d5a 100644 --- a/lib/libsndio/mio_rmidi.c +++ b/lib/libsndio/mio_rmidi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mio_rmidi.c,v 1.20 2015/11/22 12:01:23 ratchov Exp $ */ +/* $OpenBSD: mio_rmidi.c,v 1.21 2015/11/24 11:03:18 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -83,10 +83,10 @@ mio_rmidi_getfd(const char *str, unsigned int mode, int nbio) return -1; } snprintf(path, sizeof(path), DEVPATH_PREFIX "%u", devnum); - if (mode == (SIO_PLAY | SIO_REC)) + if (mode == (MIO_IN | MIO_OUT)) flags = O_RDWR; else - flags = (mode & SIO_PLAY) ? O_WRONLY : O_RDONLY; + flags = (mode & MIO_IN) ? O_WRONLY : O_RDONLY; while ((fd = open(path, flags | O_NONBLOCK | O_CLOEXEC)) < 0) { if (errno == EINTR) continue; |