diff options
author | Guillem Jover <guillem@debian.org> | 2019-01-23 03:01:17 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-01-23 03:01:17 +0100 |
commit | ee46f24f1aee0ac04e82285e2c718b13dbab1185 (patch) | |
tree | 1b1e5ec547ec23788acd24a511c23b3d35f7953d | |
parent | 8b19d061147bf318234982934c886197696c2471 (diff) | |
download | dpkg-ee46f24f1aee0ac04e82285e2c718b13dbab1185.tar.gz |
s-s-d: Only use SO_PASSCRED if defined
Fixes build failure at least on GNU/Hurd.
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | utils/start-stop-daemon.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 984643b35..d9e176e94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ dpkg (1.19.4) UNRELEASED; urgency=medium - * + * Portability: + - start-stop-daemon: Only use SO_PASSCRED if defined. Fixes build failure + at least on GNU/Hurd. -- Guillem Jover <guillem@debian.org> Tue, 22 Jan 2019 19:24:07 +0100 diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index e7e1cdc3d..d4d933f41 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -612,9 +612,11 @@ create_notify_socket(void) if (rc < 0) fatal("cannot change notification socket ownership"); +#ifdef SO_PASSCRED /* XXX: Verify we are talking to an expected child? Although it is not * clear whether this is feasible given the knowledge we have got. */ setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)); +#endif return fd; } |