d8307d
commit 043440e761d395e1f507d9faa6e82b3fe4536c3f
d8307d
Author: Florian Weimer <fweimer@redhat.com>
d8307d
Date:   Wed Mar 13 14:58:58 2019 +0100
d8307d
d8307d
    hurd: Add no-op version of __res_enable_icmp [BZ #24047]
d8307d
    
d8307d
    Mach does not support IP_RECVERR, so replace this function with a
d8307d
    stub in a sysdeps override for Hurd.
d8307d
    
d8307d
    This fixes commit 08504de71813ddbd447bfbca4a325cbe8ce8bcda
d8307d
    ("resolv: Enable full ICMP errors for UDP DNS sockets [BZ #24047]").
d8307d
    
d8307d
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
d8307d
d8307d
diff --git a/sysdeps/mach/hurd/res_enable_icmp.c b/sysdeps/mach/hurd/res_enable_icmp.c
d8307d
new file mode 100644
d8307d
index 0000000000..4b0456340c
d8307d
--- /dev/null
d8307d
+++ b/sysdeps/mach/hurd/res_enable_icmp.c
d8307d
@@ -0,0 +1,27 @@
d8307d
+/* Enable full ICMP errors on a socket.  No-op version for Hurd.
d8307d
+   Copyright (C) 2019 Free Software Foundation, Inc.
d8307d
+   This file is part of the GNU C Library.
d8307d
+
d8307d
+   The GNU C Library is free software; you can redistribute it and/or
d8307d
+   modify it under the terms of the GNU Lesser General Public
d8307d
+   License as published by the Free Software Foundation; either
d8307d
+   version 2.1 of the License, or (at your option) any later version.
d8307d
+
d8307d
+   The GNU C Library is distributed in the hope that it will be useful,
d8307d
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
d8307d
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
d8307d
+   Lesser General Public License for more details.
d8307d
+
d8307d
+   You should have received a copy of the GNU Lesser General Public
d8307d
+   License along with the GNU C Library; if not, see
d8307d
+   <http://www.gnu.org/licenses/>.  */
d8307d
+
d8307d
+/* Mach does not support the IP_RECVERR extension.  */
d8307d
+
d8307d
+#include <resolv.h>
d8307d
+
d8307d
+int
d8307d
+__res_enable_icmp (int family, int fd)
d8307d
+{
d8307d
+  return 0;
d8307d
+}