Your message dated Tue, 14 Jul 2026 14:55:30 +0000
with message-id <[email protected]>
and subject line Bug#1141047: fixed in libpcap 1.10.6-2
has caused the Debian Bug report #1141047,
regarding libpcap: fix hurd build
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1141047: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1141047
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libpcap
Version: 1.10.6-1
Severity: important
Tags: patch

Hello,

Upstream updated some function names in the 1.10 branch, here is a patch
to update the hurd support (already fixed upstream). I have also
attached the resulting new patch, whichever is simpler for you to take.

Samuel

-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 
'proposed-updates'), (500, 'oldstable-debug'), (500, 'oldoldstable'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 7.0.10+deb14-amd64 (SMP w/22 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
Samuel
<N> bon comment on fait de l'investigation pour savoir qui est le vilain ?
<s> on débranche le routeur et on regarde qui s'affole
 -+- #ens-mim administre -+-
diff -ur libpcap-1.10.6/debian/patches/hurd.diff 
libpcap-1.10.6/debian/patches/hurd.diff
--- libpcap-1.10.6/debian/patches/hurd.diff     2026-02-15 19:18:22.000000000 
+0100
+++ libpcap-1.10.6/debian/patches/hurd.diff     2026-06-29 00:28:44.161910600 
+0200
@@ -4,14 +4,14 @@
 Forwarded: 
https://github.com/the-tcpdump-group/libpcap/commit/04b51af508caec959f695bc3bbb62afa97ca5b38
 
 ---
- configure.in |   6 ++
- pcap-hurd.c  | 255 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 261 insertions(+)
+ configure.ac |   11 ++
+ pcap-hurd.c  |  263 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 274 insertions(+)
  create mode 100644 pcap-hurd.c
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -749,6 +749,7 @@
+@@ -749,6 +749,7 @@ else
        AC_CHECK_HEADERS(net/nit.h sys/net/nit.h)
        AC_CHECK_HEADERS(linux/socket.h net/raw.h sys/dlpi.h)
        AC_CHECK_HEADERS(config/HaikuConfig.h)
@@ -19,7 +19,7 @@
  
        if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
                #
-@@ -810,6 +811,11 @@
+@@ -810,6 +811,11 @@ else
                # Haiku.
                #
                V_PCAP=haiku
@@ -31,7 +31,7 @@
        else
                #
                # We don't have any capture type we know about.
-@@ -1163,6 +1169,11 @@
+@@ -1153,6 +1159,11 @@ snoop)
        PLATFORM_C_SRC="pcap-snoop.c"
        ;;
  
@@ -191,7 +191,7 @@
 +              ph->mach_dev = MACH_PORT_NULL;
 +      }
 +
-+      pcap_cleanup_live_common(p);
++      pcapint_cleanup_live_common(p);
 +}
 +
 +static int
@@ -268,7 +268,7 @@
 +
 +      p->read_op = pcap_read_hurd;
 +      p->inject_op = pcap_inject_hurd;
-+      p->setfilter_op = install_bpf_program;
++      p->setfilter_op = pcapint_install_bpf_program;
 +      p->stats_op = pcap_stats_hurd;
 +
 +      return 0;
@@ -279,7 +279,7 @@
 +}
 +
 +pcap_t *
-+pcap_create_interface(const char *device _U_, char *ebuf)
++pcapint_create_interface(const char *device _U_, char *ebuf)
 +{
 +      struct pcap_hurd *ph;
 +      pcap_t *p;
@@ -296,7 +296,7 @@
 +}
 +
 +int
-+pcap_platform_finddevs(pcap_if_list_t *alldevsp, char *errbuf)
++pcapint_platform_finddevs(pcap_if_list_t *alldevsp, char *errbuf)
 +{
 +      return 0;
 +}
From: Richard Braun <[email protected]>
Date: Thu, 10 Apr 2014 01:26:01 +0200
Subject: [PATCH] Debian GNU/Hurd (with NETDDE) support
Forwarded: 
https://github.com/the-tcpdump-group/libpcap/commit/04b51af508caec959f695bc3bbb62afa97ca5b38

---
 configure.ac |   11 ++
 pcap-hurd.c  |  263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 274 insertions(+)
 create mode 100644 pcap-hurd.c

--- a/configure.ac
+++ b/configure.ac
@@ -749,6 +749,7 @@ else
        AC_CHECK_HEADERS(net/nit.h sys/net/nit.h)
        AC_CHECK_HEADERS(linux/socket.h net/raw.h sys/dlpi.h)
        AC_CHECK_HEADERS(config/HaikuConfig.h)
+       AC_CHECK_HEADERS(hurd.h)
 
        if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
                #
@@ -810,6 +811,11 @@ else
                # Haiku.
                #
                V_PCAP=haiku
+       elif test "$ac_cv_header_hurd_h" = yes; then
+               #
+               # Hurd.
+               #
+               V_PCAP=hurd
        else
                #
                # We don't have any capture type we know about.
@@ -1153,6 +1159,11 @@ snoop)
        PLATFORM_C_SRC="pcap-snoop.c"
        ;;
 
+hurd)
+       PLATFORM_C_SRC="pcap-hurd.c"
+       LIBS="$LIBS -lrt"
+       ;;
+
 dag)
        #
        # --with-pcap=dag is the only way to get here, and it means
--- /dev/null
+++ b/pcap-hurd.c
@@ -0,0 +1,263 @@
+#define _GNU_SOURCE
+
+/* XXX Hack not to include the Mach BPF interface */
+#define _DEVICE_BPF_H_
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <fcntl.h>
+#include <hurd.h>
+#include <mach.h>
+#include <time.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <device/device.h>
+#include <device/device_types.h>
+#include <device/net_status.h>
+#include <net/if_ether.h>
+
+#include "pcap-int.h"
+
+struct pcap_hurd {
+       struct pcap_stat stat;
+       device_t mach_dev;
+       mach_port_t rcv_port;
+};
+
+static struct bpf_insn filter[] = {
+       { NETF_IN | NETF_OUT | NETF_BPF, 0, 0, 0 },
+       { BPF_RET | BPF_K, 0, 0, 1500 },
+};
+
+#define FILTER_COUNT (sizeof(filter) / sizeof(short))
+
+static int
+pcap_read_hurd(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
+{
+       struct net_rcv_msg *msg;
+       struct pcap_hurd *ph;
+       struct pcap_pkthdr h;
+       struct timespec ts;
+       int ret, wirelen, caplen;
+       u_char *pkt;
+       kern_return_t kr;
+
+       ph = p->priv;
+       msg = (struct net_rcv_msg *)p->buffer;
+
+retry:
+       if (p->break_loop) {
+               p->break_loop = 0;
+               return PCAP_ERROR_BREAK;
+       }
+
+       kr = mach_msg(&msg->msg_hdr, MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0,
+                     p->bufsize, ph->rcv_port, MACH_MSG_TIMEOUT_NONE,
+                     MACH_PORT_NULL);
+
+       if (kr) {
+               if (kr == MACH_RCV_INTERRUPTED)
+                       goto retry;
+
+               snprintf(p->errbuf, sizeof(p->errbuf), "mach_msg: %s",
+                        pcap_strerror(kr));
+               return PCAP_ERROR;
+       }
+
+       ph->stat.ps_recv++;
+
+       /* XXX Ethernet support only */
+       wirelen = ETH_HLEN + msg->net_rcv_msg_packet_count
+                 - sizeof(struct packet_header);
+       pkt = p->buffer + offsetof(struct net_rcv_msg, packet)
+             + sizeof(struct packet_header) - ETH_HLEN;
+       memmove(pkt, p->buffer + offsetof(struct net_rcv_msg, header),
+               ETH_HLEN);
+
+       caplen = (wirelen > p->snapshot) ? p->snapshot : wirelen;
+       ret = bpf_filter(p->fcode.bf_insns, pkt, wirelen, caplen);
+
+       if (!ret)
+               goto out;
+
+       clock_gettime(CLOCK_REALTIME, &ts);
+       h.ts.tv_sec = ts.tv_sec;
+       h.ts.tv_usec = ts.tv_nsec / 1000;
+       h.len = wirelen;
+       h.caplen = caplen;
+       callback(user, &h, pkt);
+
+out:
+       return 1;
+}
+
+static int
+pcap_inject_hurd(pcap_t *p, const void *buf, int size)
+{
+       struct pcap_hurd *ph;
+       kern_return_t kr;
+       int count;
+
+       ph = p->priv;
+       kr = device_write(ph->mach_dev, D_NOWAIT, 0,
+                         (io_buf_ptr_t)buf, size, &count);
+
+       if (kr) {
+               snprintf(p->errbuf, sizeof(p->errbuf), "device_write: %s",
+                        pcap_strerror(kr));
+               return -1;
+       }
+
+       return count;
+}
+
+static int
+pcap_stats_hurd(pcap_t *p, struct pcap_stat *ps)
+{
+       struct pcap_hurd *ph;
+
+       ph = p->priv;
+       *ps = ph->stat;
+       return 0;
+}
+
+static void
+pcap_cleanup_hurd(pcap_t *p)
+{
+       struct pcap_hurd *ph;
+
+       ph = p->priv;
+
+       if (ph->rcv_port != MACH_PORT_NULL) {
+               mach_port_deallocate(mach_task_self(), ph->rcv_port);
+               ph->rcv_port = MACH_PORT_NULL;
+       }
+
+       if (ph->mach_dev != MACH_PORT_NULL) {
+               device_close(ph->mach_dev);
+               ph->mach_dev = MACH_PORT_NULL;
+       }
+
+       pcapint_cleanup_live_common(p);
+}
+
+static int
+pcap_activate_hurd(pcap_t *p)
+{
+       struct pcap_hurd *ph;
+       mach_port_t master;
+       kern_return_t kr;
+
+       ph = p->priv;
+
+       /* Try devnode first */
+       master = file_name_lookup(p->opt.device, O_READ | O_WRITE, 0);
+
+       if (master != MACH_PORT_NULL)
+               kr = device_open(master, D_WRITE | D_READ, "eth", 
&ph->mach_dev);
+       else {
+               /* If unsuccessful, try Mach device */
+               kr = get_privileged_ports(NULL, &master);
+
+               if (kr) {
+                       snprintf(p->errbuf, sizeof(p->errbuf),
+                                "get_privileged_ports: %s", pcap_strerror(kr));
+                       goto error;
+               }
+
+               kr = device_open(master, D_READ | D_WRITE, p->opt.device,
+                                &ph->mach_dev);
+       }
+
+       mach_port_deallocate(mach_task_self(), master);
+
+       if (kr) {
+               snprintf(p->errbuf, sizeof(p->errbuf), "device_open: %s",
+                        pcap_strerror(kr));
+               goto error;
+       }
+
+       kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE,
+                               &ph->rcv_port);
+
+       if (kr) {
+               snprintf(p->errbuf, sizeof(p->errbuf), "mach_port_allocate: %s",
+                        pcap_strerror(kr));
+               goto error;
+       }
+
+       kr = device_set_filter(ph->mach_dev, ph->rcv_port,
+                              MACH_MSG_TYPE_MAKE_SEND, 0,
+                              (filter_array_t)filter, FILTER_COUNT);
+
+       if (kr) {
+               snprintf(p->errbuf, sizeof(p->errbuf), "device_set_filter: %s",
+                        pcap_strerror(kr));
+               goto error;
+       }
+
+       /* XXX Ethernet only currently */
+       p->linktype = DLT_EN10MB;
+
+       p->bufsize = sizeof(struct net_rcv_msg);
+       p->buffer = malloc(p->bufsize);
+
+       if (p->buffer == NULL) {
+               snprintf(p->errbuf, sizeof(p->errbuf), "malloc: %s",
+                        pcap_strerror(errno));
+               goto error;
+       }
+
+       p->dlt_list = malloc(sizeof(*p->dlt_list));
+
+       if (p->dlt_list != NULL)
+               *p->dlt_list = DLT_EN10MB;
+
+       p->read_op = pcap_read_hurd;
+       p->inject_op = pcap_inject_hurd;
+       p->setfilter_op = pcapint_install_bpf_program;
+       p->stats_op = pcap_stats_hurd;
+
+       return 0;
+
+error:
+       pcap_cleanup_hurd(p);
+       return PCAP_ERROR;
+}
+
+pcap_t *
+pcapint_create_interface(const char *device _U_, char *ebuf)
+{
+       struct pcap_hurd *ph;
+       pcap_t *p;
+
+       p = PCAP_CREATE_COMMON(ebuf, struct pcap_hurd);
+       if (p == NULL)
+               return NULL;
+
+       ph = p->priv;
+       ph->mach_dev = MACH_PORT_NULL;
+       ph->rcv_port = MACH_PORT_NULL;
+       p->activate_op = pcap_activate_hurd;
+       return p;
+}
+
+int
+pcapint_platform_finddevs(pcap_if_list_t *alldevsp, char *errbuf)
+{
+       return 0;
+}
+
+/*
+ * Libpcap version string.
+ */
+const char *
+pcap_lib_version(void)
+{
+       return PCAP_VERSION_STRING;
+}

--- End Message ---
--- Begin Message ---
Source: libpcap
Source-Version: 1.10.6-2
Done: Sven Geuer <[email protected]>

We believe that the bug you reported is fixed in the latest version of
libpcap, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sven Geuer <[email protected]> (supplier of updated libpcap package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 14 Jul 2026 16:11:07 +0200
Source: libpcap
Architecture: source
Version: 1.10.6-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Security Tools <[email protected]>
Changed-By: Sven Geuer <[email protected]>
Closes: 1141047
Changes:
 libpcap (1.10.6-2) unstable; urgency=medium
 .
   * Team upload.
 .
   [ Debian Janitor ]
   * Move transitional package libpcap-dev to oldlibs/optional per policy 4.0.1.
 .
   [ Sven Geuer ]
   * d/p/hurd.diff: Fix FTBFS on hurd-*.
     Thanks to Samuel Thibault for the updated patch (Closes: #1141047).
   * d/p/: Add patch fixing lintian warning 'groff-message'.
   * d/control:
     - Bump Standards-Version.
     - Bump debhelper-compat to 14.
   * d/gbp.conf: Introduce gbp configuration file
   * d/salsa-ci.yml: Add variable SALSA_CI_DISABLE_BUILD_PACKAGE_ALL.
   * d/copyright: Update packaging copyright holders.
Checksums-Sha1:
 f818d713ef47ef9daf80f72a133dcaf8f379b70a 2339 libpcap_1.10.6-2.dsc
 979db47aded608ae687dbfb90936d6a2a70f5f84 23956 libpcap_1.10.6-2.debian.tar.xz
 f058eb63c1b83555fb3dc00894505217491eed55 6584 libpcap_1.10.6-2_amd64.buildinfo
Checksums-Sha256:
 e9475d298c77b3eaad8887a5a492e9583b1416d75f2a69c0b4a6abdaea563323 2339 
libpcap_1.10.6-2.dsc
 6526228de82310345969bcf6c58c7ae46e06106f529519b33c5f9416d444493b 23956 
libpcap_1.10.6-2.debian.tar.xz
 0a37ceab929c8927afe12dfa47ed7c4d83ea5a5bab3cd04d1a2fcf4b0343641e 6584 
libpcap_1.10.6-2_amd64.buildinfo
Files:
 11fef814adabc88ce63e8576bcfe11ba 2339 devel optional libpcap_1.10.6-2.dsc
 9d7e14e618f7ef1cbbd2e9102072d809 23956 devel optional 
libpcap_1.10.6-2.debian.tar.xz
 5a22ded7e39f1ed3a9713a03feabc183 6584 devel optional 
libpcap_1.10.6-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEEPfXoqkP8n9/QhvGVrfUO2vit1YUFAmpWSaYPHHNnZUBkZWJp
YW4ub3JnAAoJEK31Dtr4rdWFihAP/2KU33xH9vkcjiTAndtDbvJSuNHhjMovscqp
pdItHUynpve5CWCOSY0s55mReFM/+sXJh+obdbXeLwyp85wLHcuLJOXYflTAlf2v
Jfrw4edqAjiw+8Xk+wBhw9iWgpIGZARPjZOWdQez8R+E2+Z9BTtxPxNNErSlrFEa
qWOVTLDu0jBCfxNKCNhZRFgUMppoaX2DgUgoxEs2Dsx/5DhRdDNM1bx1vQt74xuQ
07ctVPbFvhhgAfXJGN3PoeVbcYN0Sou8VHrLg0t43Texw/ASmYeodLH/4Kh6OHGi
R26hDQwdWFn188aQQiNgkxC3aQ0X68nn+Dvhz3BxgzUBjpDSr/K/L9UzGugoC3gT
CxzB6aRLPoean8tUgbS0+uiZR2XnwMjkEtrTgLhdZrVCGyPOQXb65cW45qVKHR1T
sEY7TURVcD90rHIITYJlLxc5EyEYM5jW1rwR/qm4kfXkNdDcdLdJ06GuGBD0Ad95
WqplN/Ygo+JPxw3xlFS9t0MoZg4jvxMNX685XMSiaTPSJhRQULaPH5as7xc3VIPy
9DTZByTUgggv1t6vRFdUwMhaJM22ZAvXpBaH161Dn/surAeVvelXru+ZvHz5RbGP
ZYmLtiCAkgFt9TJjEFt0jiqFg+DXUH1ezkLWyjl+g0hBgHyjG4+oQjyvLsukFL8x
kzd9DWkA
=l86c
-----END PGP SIGNATURE-----

Attachment: pgpNCBUNRYmbB.pgp
Description: PGP signature


--- End Message ---

Reply via email to