summaryrefslogtreecommitdiff
path: root/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'libutil')
-rw-r--r--libutil/Makefile.in4
-rw-r--r--libutil/openpty.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/libutil/Makefile.in b/libutil/Makefile.in
index a1c0beefc..1c4b910ba 100644
--- a/libutil/Makefile.in
+++ b/libutil/Makefile.in
@@ -20,6 +20,10 @@ libutil_SRC := $(wildcard $(libutil_DIR)/*.c)
ifneq ($(ARCH_USE_MMU),y)
libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
endif
+ifneq ($(UCLIBC_HAS_PTY),y)
+libutil_SRC := $(filter-out $(libutil_DIR)/openpty.c $(libutil_DIR)/forkpty.c \
+ ,$(libutil_SRC))
+endif
libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
ifeq ($(DOPIC),y)
diff --git a/libutil/openpty.c b/libutil/openpty.c
index 9a65e56b1..5f58476e9 100644
--- a/libutil/openpty.c
+++ b/libutil/openpty.c
@@ -106,7 +106,7 @@ openpty (int *amaster, int *aslave, char *name, struct termios *termp,
#endif
int master, slave;
- master = getpt ();
+ master = posix_openpt (O_RDWR);
if (master == -1)
return -1;