mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Update libpcap to 1.9.0 (no patches applied yet)
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