This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=ee46f24f1aee0ac04e82285e2c718b13dbab1185

The following commit(s) were added to refs/heads/master by this push:
     new ee46f24f1 s-s-d: Only use SO_PASSCRED if defined
ee46f24f1 is described below

commit ee46f24f1aee0ac04e82285e2c718b13dbab1185 (HEAD -> master)
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Jan 23 03:01:17 2019 +0100

    s-s-d: Only use SO_PASSCRED if defined
    
    Fixes build failure at least on GNU/Hurd.
---
 debian/changelog          | 4 +++-
 utils/start-stop-daemon.c | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

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 <[email protected]>  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;
 }

-- 
Dpkg.Org's dpkg

Reply via email to