[newlib-cygwin] Fix access to ifru_buffer on freebsd32.

Sebastian Huber sh@sourceware.org
Fri Aug 24 13:11:00 GMT 2018


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f967e60caba38e814c54eeb189c85b24d499c686

commit f967e60caba38e814c54eeb189c85b24d499c686
Author: brooks <brooks@FreeBSD.org>
Date:   Tue Mar 27 18:26:50 2018 +0000

    Fix access to ifru_buffer on freebsd32.
    
    Make all kernel accesses to ifru_buffer go via access functions
    which take the process ABI into account and use an appropriate union
    to access members in the correct place in struct ifreq.
    
    Reviewed by:	kib
    Obtained from:	CheriBSD
    MFC after:	1 week
    Sponsored by:	DARPA, AFRL
    Differential Revision:	https://reviews.freebsd.org/D14846

Diff:
---
 newlib/libc/sys/rtems/include/net/if.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newlib/libc/sys/rtems/include/net/if.h b/newlib/libc/sys/rtems/include/net/if.h
index d13e737..e9e6391 100644
--- a/newlib/libc/sys/rtems/include/net/if.h
+++ b/newlib/libc/sys/rtems/include/net/if.h
@@ -402,7 +402,9 @@ struct	ifreq {
 #define	ifr_addr	ifr_ifru.ifru_addr	/* address */
 #define	ifr_dstaddr	ifr_ifru.ifru_dstaddr	/* other end of p-to-p link */
 #define	ifr_broadaddr	ifr_ifru.ifru_broadaddr	/* broadcast address */
+#ifndef _KERNEL
 #define	ifr_buffer	ifr_ifru.ifru_buffer	/* user supplied buffer with its length */
+#endif
 #define	ifr_flags	ifr_ifru.ifru_flags[0]	/* flags (low 16 bits) */
 #define	ifr_flagshigh	ifr_ifru.ifru_flags[1]	/* flags (high 16 bits) */
 #define	ifr_jid		ifr_ifru.ifru_jid	/* jail/vnet */



More information about the Newlib-cvs mailing list