summaryrefslogtreecommitdiff
path: root/libutil/openpty.c
diff options
context:
space:
mode:
authorMarcus Haehnel <marcus.haehnel@kernkonzept.com>2025-06-03 07:43:16 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2025-06-30 10:35:36 +0200
commitc0a9f8cf8e81516f07cac6abc78a70b07e79e148 (patch)
treecc94946a8fc7d5dbab21649090d715db428fe810 /libutil/openpty.c
parent617d6f88a354d23962dbd9af81b5163ed46c0b04 (diff)
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 <marcus.haehnel@kernkonzept.com>
Diffstat (limited to 'libutil/openpty.c')
-rw-r--r--libutil/openpty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libutil/openpty.c b/libutil/openpty.c
index 848dc8d38..e14cbc57d 100644
--- a/libutil/openpty.c
+++ b/libutil/openpty.c
@@ -85,8 +85,8 @@ pts_name (int fd, char **pts, size_t buf_len)
according to TERMP and WINP. Return handles for both ends in
AMASTER and ASLAVE, and return the name of the slave end in NAME. */
int
-openpty (int *amaster, int *aslave, char *name, struct termios *termp,
- struct winsize *winp)
+openpty (int *amaster, int *aslave, char *name, const struct termios *termp,
+ const struct winsize *winp)
{
#if 0
#ifdef PATH_MAX