summaryrefslogtreecommitdiff
path: root/pppd/Makefile.am
diff options
context:
space:
mode:
authorpali <7141871+pali@users.noreply.github.com>2021-09-27 09:10:31 +0200
committerGitHub <noreply@github.com>2021-09-27 17:10:31 +1000
commitb21711c71f2bf9537f5985339cf6e224738315ef (patch)
treefeb524c9e036bdb4f2e5c2be58c6e56351833d98 /pppd/Makefile.am
parent7adcfc961d3ccb051da87cc95d76cd3344f00fb8 (diff)
downloadppp-b21711c71f2bf9537f5985339cf6e224738315ef.tar.gz
pppd: Fix usage of BOTHER ioctl API on Linux (#314)
Linux architectures have different content of struct termios2 and also different value of BOTHER macro. So do not declare any struct termios2 nor BOTHER macro. Current definitions in ppp were applicable only for x86. Correct definitions for current architecture are only in <asm/termbits.h> and <asm/ioctls.h> header files. But Linux header file <asm/termbits.h> is in conflict with glibc header file <termios.h> and only one can be included in one source unit. Moreover both header files contains struct termios but with different content. So it is not possible to use glibc tc* functions with <asm/termbits.h> definitions. For this reason provide a new include header file "termios_linux.h" which provides custom implementation of all glibc's termios.h functions via Linux ioctl() interface with definitions from Linux <asm/termbits.h> header file. Thus this "termios_linux.h" is replacement for <termios.h> with additional support for BOTHER Linux termios API. Same "termios_linux.h" is going to be used by U-Boot's kwboot utility for the same reason to use arbitrary baudrate value via BOTHER ioctl API. Hopefully one day glibc will provide some API functions for functionality provided currently by BOTHER Linux API. Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'pppd/Makefile.am')
-rw-r--r--pppd/Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/pppd/Makefile.am b/pppd/Makefile.am
index 2244507..03c6fd4 100644
--- a/pppd/Makefile.am
+++ b/pppd/Makefile.am
@@ -72,7 +72,7 @@ pppd_LDFLAGS =
pppd_LIBS =
if LINUX
-pppd_SOURCES += sys-linux.c
+pppd_SOURCES += sys-linux.c termios_linux.h
pppd_LIBS += $(CRYPT_LIBS) $(UTIL_LIBS)
endif