diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.c | 10 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.h | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e9762ba6..f96c70bc 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 af58f3bd..a2f75055 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 3cb912d2..af2ccdae 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 */ |