From 55d2bf5bef0a04bd976b35f968598637e26e95ed Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 21 Sep 2022 21:15:02 +0000 Subject: Use route.h from glibc Unfortunately the Linux source also uses , so we have to both make that include the glibc-provided one, and avoid making it emit Linuxish definitions when they would conflict with glibc definitions. --- pfinet/linux-src/include/net/route.h | 3 +++ pfinet/pfinet.h | 7 +++++- pfinet/route.h | 42 ------------------------------------ 3 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 pfinet/route.h (limited to 'pfinet') diff --git a/pfinet/linux-src/include/net/route.h b/pfinet/linux-src/include/net/route.h index 40aabdf6..e9ca2fee 100644 --- a/pfinet/linux-src/include/net/route.h +++ b/pfinet/linux-src/include/net/route.h @@ -20,6 +20,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ + +#include_next + #ifndef _ROUTE_H #define _ROUTE_H diff --git a/pfinet/pfinet.h b/pfinet/pfinet.h index f8a1dd8d..df8da526 100644 --- a/pfinet/pfinet.h +++ b/pfinet/pfinet.h @@ -29,7 +29,12 @@ #include #include #include -#include "route.h" + +/* Unfortunately the Linux source also uses . + * Here we want the glibc-provided one only */ +#define _ROUTE_H +#include +#undef _ROUTE_H extern pthread_mutex_t global_lock; extern pthread_mutex_t net_bh_lock; diff --git a/pfinet/route.h b/pfinet/route.h deleted file mode 100644 index 00beb6c1..00000000 --- a/pfinet/route.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2022 Free Software Foundation, Inc. - - This file is part of the GNU Hurd. - - The GNU Hurd is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2, or (at - your option) any later version. - - The GNU Hurd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ - -#ifndef ROUTE_H_ -#define ROUTE_H_ - -#include -#include -#include -#include - -typedef struct ifrtreq { - char ifname[IFNAMSIZ]; - in_addr_t rt_dest; - in_addr_t rt_mask; - in_addr_t rt_gateway; - int rt_flags; - int rt_metric; - int rt_mtu; - int rt_window; - int rt_irtt; - int rt_tos; - int rt_class; -} ifrtreq_t; - -#endif -- cgit v1.2.3