1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

New code doesn't build on old versions of OS X so only support 10.7 and

later. Reported by Jared Scheel and tested by Chris Johnsen.
This commit is contained in:
Nicholas Marriott 2013-03-28 08:36:34 +00:00
parent 64ea8829af
commit dc2af8347b

View File

@ -18,6 +18,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <Availability.h>
#include <event.h> #include <event.h>
#include <libproc.h> #include <libproc.h>
#include <stdlib.h> #include <stdlib.h>
@ -33,6 +34,7 @@ struct event_base *osdep_event_init(void);
char * char *
osdep_get_name(int fd, unused char *tty) osdep_get_name(int fd, unused char *tty)
{ {
#ifdef __MAC_10_7
struct proc_bsdshortinfo bsdinfo; struct proc_bsdshortinfo bsdinfo;
pid_t pgrp; pid_t pgrp;
int ret; int ret;
@ -44,6 +46,7 @@ osdep_get_name(int fd, unused char *tty)
&bsdinfo, sizeof bsdinfo); &bsdinfo, sizeof bsdinfo);
if (ret == sizeof bsdinfo && *bsdinfo.pbsi_comm != '\0') if (ret == sizeof bsdinfo && *bsdinfo.pbsi_comm != '\0')
return (strdup(bsdinfo.pbsi_comm)); return (strdup(bsdinfo.pbsi_comm));
#endif
return (NULL); return (NULL);
} }