From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14661 invoked by alias); 24 Aug 2018 13:11:05 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 13473 invoked by uid 10080); 24 Aug 2018 13:11:04 -0000 Date: Fri, 24 Aug 2018 13:11:00 -0000 Message-ID: <20180824131104.13456.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Fix access to ifru_buffer on freebsd32. X-Act-Checkin: newlib-cygwin X-Git-Author: brooks X-Git-Refname: refs/heads/master X-Git-Oldrev: b0250c735673311c2d5d268257bc379792a275f8 X-Git-Newrev: f967e60caba38e814c54eeb189c85b24d499c686 X-SW-Source: 2018-q3/txt/msg00079.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f967e60caba38e814c54eeb189c85b24d499c686 commit f967e60caba38e814c54eeb189c85b24d499c686 Author: brooks 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 */