mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Guard some non-portable error code defines with #ifdef's
This commit is contained in:
parent
af5ba6cf4c
commit
3faf388821
1 changed files with 10 additions and 2 deletions
|
|
@ -99,9 +99,17 @@ static inline int res_to_err(int res)
|
|||
case -EINVAL: return ERR_INVALID;
|
||||
case -EEXIST: return ERR_EXIST;
|
||||
case -ENOENT: case -ESRCH: case -ENXIO: case -ENODEV: return ERR_NOENTITY;
|
||||
case -ECONNREFUSED: case -ENONET: case -EHOSTDOWN: case -ENETDOWN: return ERR_CONNECTIONREFUSED;
|
||||
case -ECONNREFUSED:
|
||||
#ifdef ENONET
|
||||
case -ENONET:
|
||||
#endif
|
||||
case -EHOSTDOWN: case -ENETDOWN: return ERR_CONNECTIONREFUSED;
|
||||
case -EPROTO: case -EBADMSG: return ERR_PROTOCOL;
|
||||
case -ETIMEDOUT: case -ETIME: return ERR_TIMEOUT;
|
||||
case -ETIMEDOUT:
|
||||
#ifdef ETIME
|
||||
case -ETIME:
|
||||
#endif
|
||||
return ERR_TIMEOUT;
|
||||
#ifdef ENOKEY
|
||||
case -ENOKEY: return ERR_AUTHKEY;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue