diff --git a/pipewire-alsa/alsa-plugins/ctl_pipewire.c b/pipewire-alsa/alsa-plugins/ctl_pipewire.c index 4830cf69e..8e8cb5a2e 100644 --- a/pipewire-alsa/alsa-plugins/ctl_pipewire.c +++ b/pipewire-alsa/alsa-plugins/ctl_pipewire.c @@ -286,7 +286,7 @@ static int pipewire_elem_count(snd_ctl_ext_t * ext) assert(ctl); if (!ctl->mainloop) - return -EBADFD; + return -EBADF; pw_thread_loop_lock(ctl->mainloop); @@ -322,7 +322,7 @@ static int pipewire_elem_list(snd_ctl_ext_t * ext, unsigned int offset, assert(ctl); if (!ctl->mainloop) - return -EBADFD; + return -EBADF; snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_MIXER); @@ -393,7 +393,7 @@ static int pipewire_get_attribute(snd_ctl_ext_t * ext, snd_ctl_ext_key_t key, assert(ctl); if (!ctl->mainloop) - return -EBADFD; + return -EBADF; pw_thread_loop_lock(ctl->mainloop); @@ -449,7 +449,7 @@ static int pipewire_read_integer(snd_ctl_ext_t * ext, snd_ctl_ext_key_t key, assert(ctl); if (!ctl->mainloop) - return -EBADFD; + return -EBADF; pw_thread_loop_lock(ctl->mainloop); @@ -583,7 +583,7 @@ static int pipewire_write_integer(snd_ctl_ext_t * ext, snd_ctl_ext_key_t key, assert(ctl); if (!ctl->mainloop) - return -EBADFD; + return -EBADF; pw_thread_loop_lock(ctl->mainloop); @@ -682,7 +682,7 @@ static int pipewire_read_event(snd_ctl_ext_t * ext, snd_ctl_elem_id_t * id, assert(ctl); if (!ctl->mainloop) - return -EBADFD; + return -EBADF; pw_thread_loop_lock(ctl->mainloop); @@ -739,7 +739,7 @@ static int pipewire_ctl_poll_revents(snd_ctl_ext_t * ext, struct pollfd *pfd, assert(ctl); if (!ctl->mainloop) - return -EBADFD; + return -EBADF; pw_thread_loop_lock(ctl->mainloop); diff --git a/spa/plugins/alsa/alsa-compress-offload-sink.c b/spa/plugins/alsa/alsa-compress-offload-sink.c index e119270ad..6ce75a67c 100644 --- a/spa/plugins/alsa/alsa-compress-offload-sink.c +++ b/spa/plugins/alsa/alsa-compress-offload-sink.c @@ -586,7 +586,7 @@ static int device_write(struct impl *this, const void *data, uint32_t size) res = compress_offload_api_write(this->device_context, data, num_bytes_to_write); if (SPA_UNLIKELY(res < 0)) { - if (res == -EBADFD) + if (res == -EBADF) spa_log_debug(this->log, "%p: device is paused", this); else spa_log_error(this->log, "%p: write error: %s", this, spa_strerror(res)); diff --git a/spa/plugins/alsa/compress-offload-api.c b/spa/plugins/alsa/compress-offload-api.c index c5f6a4be7..38ad1870a 100644 --- a/spa/plugins/alsa/compress-offload-api.c +++ b/spa/plugins/alsa/compress-offload-api.c @@ -254,8 +254,8 @@ int compress_offload_api_write(struct compress_offload_api_context *context, con num_bytes_written = write(context->fd, data, size); if (num_bytes_written < 0) { switch (errno) { - case EBADFD: - /* EBADFD indicates that the device is paused and thus is not an error. */ + case EBADF: + /* EBADF indicates that the device is paused and thus is not an error. */ break; default: spa_log_error(context->log, "could not write %zu byte(s): %s (%d)", diff --git a/src/modules/module-protocol-pulse/defs.h b/src/modules/module-protocol-pulse/defs.h index e03cbdc95..8c43b28f4 100644 --- a/src/modules/module-protocol-pulse/defs.h +++ b/src/modules/module-protocol-pulse/defs.h @@ -107,9 +107,7 @@ static inline int res_to_err(int res) case -ENOKEY: return ERR_AUTHKEY; #endif case -ECONNRESET: case -EPIPE: return ERR_CONNECTIONTERMINATED; -#ifdef EBADFD - case -EBADFD: return ERR_BADSTATE; -#endif + case -EBADF: return ERR_BADSTATE; #ifdef ENODATA case -ENODATA: return ERR_NODATA; #endif @@ -144,9 +142,7 @@ static inline int err_to_res(int err) case ERR_KILLED: return -EFAULT; case ERR_INVALIDSERVER: return -EINVAL; case ERR_MODINITFAILED: return -EIO; -#ifdef EBADFD - case ERR_BADSTATE: return -EBADFD; -#endif + case ERR_BADSTATE: return -EBADF; case ERR_NODATA: return -ENODATA; case ERR_VERSION: return -EPROTO; case ERR_TOOLARGE: return -E2BIG;