mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 11:14:47 +08:00
Update to FreeBSD head 2018-06-01
Git mirror commit fb63610a69b0eb7f69a201ba05c4c1a7a2739cf9. Update #3472.
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <pcap/pcap-inttypes.h>
|
||||
#include <pcap/compiler-tests.h>
|
||||
|
||||
/*
|
||||
* Macros to extract possibly-unaligned big-endian integral values.
|
||||
*/
|
||||
@@ -30,15 +33,16 @@
|
||||
/*
|
||||
* The processor doesn't natively handle unaligned loads.
|
||||
*/
|
||||
#if defined(__GNUC__) && defined(HAVE___ATTRIBUTE__) && \
|
||||
#if PCAP_IS_AT_LEAST_GNUC_VERSION(2,0) && \
|
||||
(defined(__alpha) || defined(__alpha__) || \
|
||||
defined(__mips) || defined(__mips__))
|
||||
|
||||
/*
|
||||
* This is a GCC-compatible compiler and we have __attribute__, which
|
||||
* we assume that mean we have __attribute__((packed)), and this is
|
||||
* MIPS or Alpha, which has instructions that can help when doing
|
||||
* unaligned loads.
|
||||
* This is MIPS or Alpha, which don't natively handle unaligned loads,
|
||||
* but which have instructions that can help when doing unaligned
|
||||
* loads, and this is GCC 2.0 or later or a compiler that claims to
|
||||
* be GCC 2.0 or later, which we assume that mean we have
|
||||
* __attribute__((packed)), which we can use to convince the compiler
|
||||
* to generate those instructions.
|
||||
*
|
||||
* Declare packed structures containing a uint16_t and a uint32_t,
|
||||
* cast the pointer to point to one of those, and fetch through it;
|
||||
|
Reference in New Issue
Block a user