On a Cray system I'm working on, it seems that `SO_PRIORITY` is defined,
but `IPTOS_CLASS_CS6` is not. Without this patch, compilation fails at
line 150:
```
r = ::setsockopt(sd, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio));
```
because the variable `r` is not defined (originally it is defined inside
the `#ifdef IPTOS_CLASS_CS6` block).
Fixes: https://tracker.ceph.com/issues/42821
Signed-off-by: Carlos Valiente <carlos.valiente@ecmwf.int>
(cherry picked from commit
11974177574178451eb88fcaba011772d29a641d)
if (prio < 0) {
return;
}
+ int r = -1;
#ifdef IPTOS_CLASS_CS6
int iptos = IPTOS_CLASS_CS6;
- int r = -1;
switch (domain) {
case AF_INET:
r = ::setsockopt(sd, IPPROTO_IP, IP_TOS, &iptos, sizeof(iptos));