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 e9762ba68..f96c70bcd 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1739,6 +1739,7 @@ AC_CHECK_FUNCS([ \ | |||
1739 | getpgrp \ | 1739 | getpgrp \ |
1740 | _getpty \ | 1740 | _getpty \ |
1741 | getrlimit \ | 1741 | getrlimit \ |
1742 | getsid \ | ||
1742 | getttyent \ | 1743 | getttyent \ |
1743 | glob \ | 1744 | glob \ |
1744 | group_from_gid \ | 1745 | 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) | |||
298 | kill(getpid(), sig); | 298 | kill(getpid(), sig); |
299 | } | 299 | } |
300 | #endif | 300 | #endif |
301 | |||
302 | #ifndef HAVE_GETSID | ||
303 | pid_t | ||
304 | getsid(pid_t pid) | ||
305 | { | ||
306 | errno = ENOSYS; | ||
307 | return -1; | ||
308 | } | ||
309 | #endif | ||
310 | |||
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); | |||
141 | int raise(int); | 141 | int raise(int); |
142 | #endif | 142 | #endif |
143 | 143 | ||
144 | #ifndef HAVE_GETSID | ||
145 | pid_t getsid(pid_t); | ||
146 | #endif | ||
147 | |||
144 | #endif /* _BSD_MISC_H */ | 148 | #endif /* _BSD_MISC_H */ |