summaryrefslogtreecommitdiffstats
path: root/gnu/libexec/uucp/libunix/portnm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/uucp/libunix/portnm.c')
-rw-r--r--gnu/libexec/uucp/libunix/portnm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/libexec/uucp/libunix/portnm.c b/gnu/libexec/uucp/libunix/portnm.c
index 9eda4ab..11f1247 100644
--- a/gnu/libexec/uucp/libunix/portnm.c
+++ b/gnu/libexec/uucp/libunix/portnm.c
@@ -1,6 +1,8 @@
/* portnm.c
Get the port name of stdin. */
+/* $FreeBSD$ */
+
#include "uucp.h"
#include "sysdep.h"
@@ -12,6 +14,7 @@
#endif
#include <sys/socket.h>
#endif
+#include <paths.h>
#ifndef ttyname
extern char *ttyname ();
@@ -44,8 +47,8 @@ zsysdep_port_name (ftcp_port)
z = ttyname (0);
if (z == NULL)
return NULL;
- if (strncmp (z, "/dev/", sizeof "/dev/" - 1) == 0)
- return z + sizeof "/dev/" - 1;
+ if (strncmp (z, _PATH_DEV, sizeof _PATH_DEV - 1) == 0)
+ return z + sizeof _PATH_DEV - 1;
else
return z;
}
OpenPOWER on IntegriCloud