From b39593a6de5290650a01adf8699c6460570403c2 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 25 Feb 2018 13:25:15 +1100 Subject: Add no-op getsid implmentation. --- configure.ac | 1 + openbsd-compat/bsd-misc.c | 10 ++++++++++ openbsd-compat/bsd-misc.h | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index e9762ba68..f96c70bcd 100644 --- a/configure.ac +++ b/configure.ac @@ -1739,6 +1739,7 @@ AC_CHECK_FUNCS([ \ getpgrp \ _getpty \ getrlimit \ + getsid \ getttyent \ glob \ group_from_gid \ diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index af58f3bd2..a2f750558 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -298,3 +298,13 @@ raise(int sig) kill(getpid(), sig); } #endif + +#ifndef HAVE_GETSID +pid_t +getsid(pid_t pid) +{ + errno = ENOSYS; + return -1; +} +#endif + diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 3cb912d28..af2ccdae2 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -141,4 +141,8 @@ void bzero(void *, size_t); int raise(int); #endif +#ifndef HAVE_GETSID +pid_t getsid(pid_t); +#endif + #endif /* _BSD_MISC_H */ -- cgit v1.2.3