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