git: 9front

ref: e8f5e0909f4a7c7ae2c4e85f563e6b4da88aa98f
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;
}