From c0a9f8cf8e81516f07cac6abc78a70b07e79e148 Mon Sep 17 00:00:00 2001 From: Marcus Haehnel Date: Tue, 3 Jun 2025 07:43:16 +0200 Subject: openpty/forkpty: use const for termios and winsize arguments The termios and winsize arguments are const as per the POSIX standard, and also uclibc and musl define them as such. Adapt the uclibc-ng definitions and declarations accordingly to improve compatibility. Signed-off-by: Marcus Haehnel --- include/pty.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/pty.h b/include/pty.h index f23a260ae..609ac2459 100644 --- a/include/pty.h +++ b/include/pty.h @@ -31,13 +31,15 @@ __BEGIN_DECLS attributes according to TERMP and WINP and return handles for both ends in AMASTER and ASLAVE. */ extern int openpty (int *__amaster, int *__aslave, char *__name, - struct termios *__termp, struct winsize *__winp) __THROW; + const struct termios *__termp, + const struct winsize *__winp) __THROW; libutil_hidden_proto(openpty) /* Create child process and establish the slave pseudo terminal as the child's controlling terminal. */ extern int forkpty (int *__amaster, char *__name, - struct termios *__termp, struct winsize *__winp) __THROW; + const struct termios *__termp, + const struct winsize *__winp) __THROW; __END_DECLS -- cgit v1.2.3