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