comparison netio.c @ 1426:89f8c5960527

test for linux/pkt-sched.h rather than SO_PRIORITY
author Matt Johnston <matt@ucc.asn.au>
date Fri, 23 Jun 2017 23:36:33 +0800
parents 2c9dac2d6707
children 69862e8cc405 06d52bcb8094
comparison
equal deleted inserted replaced
1425:39aaf9f4d576 1426:89f8c5960527
304 304
305 int rc; 305 int rc;
306 #ifdef IPTOS_LOWDELAY 306 #ifdef IPTOS_LOWDELAY
307 int iptos_val = 0; 307 int iptos_val = 0;
308 #endif 308 #endif
309 #ifdef SO_PRIORITY 309 #ifdef HAVE_LINUX_PKT_SCHED_H
310 int so_prio_val = 0; 310 int so_prio_val = 0;
311 #endif 311 #endif
312 312
313 313
314 /* Don't log ENOTSOCK errors so that this can harmlessly be called 314 /* Don't log ENOTSOCK errors so that this can harmlessly be called
331 if (rc < 0 && errno != ENOTSOCK) { 331 if (rc < 0 && errno != ENOTSOCK) {
332 TRACE(("Couldn't set IP_TOS (%s)", strerror(errno))); 332 TRACE(("Couldn't set IP_TOS (%s)", strerror(errno)));
333 } 333 }
334 #endif 334 #endif
335 335
336 #ifdef SO_PRIORITY 336 #ifdef HAVE_LINUX_PKT_SCHED_H
337 if (prio == DROPBEAR_PRIO_LOWDELAY) { 337 if (prio == DROPBEAR_PRIO_LOWDELAY) {
338 so_prio_val = TC_PRIO_INTERACTIVE; 338 so_prio_val = TC_PRIO_INTERACTIVE;
339 } else if (prio == DROPBEAR_PRIO_BULK) { 339 } else if (prio == DROPBEAR_PRIO_BULK) {
340 so_prio_val = TC_PRIO_BULK; 340 so_prio_val = TC_PRIO_BULK;
341 } 341 }