git: 9front

ref: 332f070e5a51e5fcc1f2f17f15f67aa98a01b5f4
dir: /sys/src/ape/lib/ap/plan9/ttyname.c/

View raw version
#include <unistd.h>
#include <stdio.h>

char *
ttyname(int fd)
{
	static char buf[100];

	sprintf(buf, "/fd/%d", fd);
	return buf;
}