From cd577c539a10c1aa5d59f3d6cfaab5f55c218c0b Mon Sep 17 00:00:00 2001 From: kleink Date: Tue, 23 Feb 1999 16:59:38 +0000 Subject: [PATCH] Addendum to rev. 1.15: use of __extension__ here is supported in GCC 2.8.0 and above only; since this is the only occurence, fix it locally rather than in as to not remove all the functionality on pre-2.8 systems. XXX Shouldn't use zero-length arrays at all. --- sys/net/if_arp.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/if_arp.h b/sys/net/if_arp.h index c3b3e95acd79..98378f2289be 100644 --- a/sys/net/if_arp.h +++ b/sys/net/if_arp.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.h,v 1.15 1999/02/21 17:35:17 kleink Exp $ */ +/* $NetBSD: if_arp.h,v 1.16 1999/02/23 16:59:38 kleink Exp $ */ /* * Copyright (c) 1986, 1993 @@ -74,7 +74,10 @@ struct arphdr { u_int8_t ar_tpa[]; /* target protocol address */ #endif /* LINTED 0 sized arrays are not legal, but we like one here */ +#if defined(__GNUC__) && (((__GNUC__ == 2) && (__GNUC_MINOR >= 8)) || \ + (__GNUC__ > 2)) __extension__ +#endif u_int8_t ar_remain[0]; /* minimum size, normally bigger */ #define ar_sha(ap) (((ap)->ar_remain)+0) #define ar_spa(ap) (((ap)->ar_remain)+(ap)->ar_hln)