mirror of
https://github.com/clearml/dropbear
synced 2025-04-22 07:05:13 +00:00
test for linux/pkt-sched.h rather than SO_PRIORITY
This commit is contained in:
parent
3c5ed47804
commit
24b446705b
@ -233,7 +233,11 @@ AC_ARG_ENABLE(shadow,
|
|||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_HEADER_SYS_WAIT
|
AC_HEADER_SYS_WAIT
|
||||||
AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h netinet/tcp.h stdlib.h string.h sys/socket.h sys/time.h termios.h unistd.h crypt.h pty.h ioctl.h libutil.h libgen.h inttypes.h stropts.h utmp.h utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h pam/pam_appl.h netinet/in_systm.h sys/uio.h])
|
AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h netinet/tcp.h stdlib.h \
|
||||||
|
string.h sys/socket.h sys/time.h termios.h unistd.h crypt.h \
|
||||||
|
pty.h ioctl.h libutil.h libgen.h inttypes.h stropts.h utmp.h \
|
||||||
|
utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \
|
||||||
|
pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h])
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
|
@ -156,7 +156,7 @@ typedef unsigned int u_int32_t;
|
|||||||
typedef u_int32_t uint32_t;
|
typedef u_int32_t uint32_t;
|
||||||
#endif /* HAVE_UINT32_T */
|
#endif /* HAVE_UINT32_T */
|
||||||
|
|
||||||
#ifdef SO_PRIORITY
|
#ifdef HAVE_LINUX_PKT_SCHED_H
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/pkt_sched.h>
|
#include <linux/pkt_sched.h>
|
||||||
#endif
|
#endif
|
||||||
|
4
netio.c
4
netio.c
@ -306,7 +306,7 @@ void set_sock_priority(int sock, enum dropbear_prio prio) {
|
|||||||
#ifdef IPTOS_LOWDELAY
|
#ifdef IPTOS_LOWDELAY
|
||||||
int iptos_val = 0;
|
int iptos_val = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_PRIORITY
|
#ifdef HAVE_LINUX_PKT_SCHED_H
|
||||||
int so_prio_val = 0;
|
int so_prio_val = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ void set_sock_priority(int sock, enum dropbear_prio prio) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SO_PRIORITY
|
#ifdef HAVE_LINUX_PKT_SCHED_H
|
||||||
if (prio == DROPBEAR_PRIO_LOWDELAY) {
|
if (prio == DROPBEAR_PRIO_LOWDELAY) {
|
||||||
so_prio_val = TC_PRIO_INTERACTIVE;
|
so_prio_val = TC_PRIO_INTERACTIVE;
|
||||||
} else if (prio == DROPBEAR_PRIO_BULK) {
|
} else if (prio == DROPBEAR_PRIO_BULK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user