mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-20 02:30:05 +02:00
87 lines
2.7 KiB
Plaintext
87 lines
2.7 KiB
Plaintext
From 4a5b56be7058fa79fa280189d3d58ea7ab1c411b Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Wed, 11 Jan 2023 15:51:17 +0000
|
|
Subject: gcc2 patch
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index ff7e490..3e6d1a0 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -110,7 +110,7 @@ AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
|
|
#
|
|
AC_PROG_CC_C99
|
|
if test "$ac_cv_prog_cc_c99" = "no"; then
|
|
- AC_MSG_ERROR([The C compiler does not support C99])
|
|
+ AC_MSG_WARN([The C compiler does not support C99])
|
|
fi
|
|
|
|
#
|
|
diff --git a/fmtutils.c b/fmtutils.c
|
|
index 2d35762..9b47bb5 100644
|
|
--- a/fmtutils.c
|
|
+++ b/fmtutils.c
|
|
@@ -283,6 +283,7 @@ pcap_vfmt_errmsg_for_errno(char *errbuf, size_t errbuflen, int errnum,
|
|
size_t msglen;
|
|
char *p;
|
|
size_t errbuflen_remaining;
|
|
+ int err;
|
|
|
|
(void)vsnprintf(errbuf, errbuflen, fmt, ap);
|
|
msglen = strlen(errbuf);
|
|
@@ -351,7 +352,7 @@ pcap_vfmt_errmsg_for_errno(char *errbuf, size_t errbuflen, int errnum,
|
|
* We have a POSIX-style strerror_r(), which is guaranteed to fill
|
|
* in the buffer, but is not guaranteed to succeed.
|
|
*/
|
|
- int err = strerror_r(errnum, p, errbuflen_remaining);
|
|
+ err = strerror_r(errnum, p, errbuflen_remaining);
|
|
if (err == EINVAL) {
|
|
/*
|
|
* UNIX 03 says this isn't guaranteed to produce a
|
|
diff --git a/pcap-haiku.cpp b/pcap-haiku.cpp
|
|
index 8ae9119..cea2118 100644
|
|
--- a/pcap-haiku.cpp
|
|
+++ b/pcap-haiku.cpp
|
|
@@ -47,7 +47,7 @@ prepare_request(struct ifreq& request, const char* name)
|
|
|
|
|
|
static int
|
|
-pcap_read_haiku(pcap_t* handle, int maxPackets _U_, pcap_handler callback,
|
|
+pcap_read_haiku(pcap_t* handle, int maxPackets, pcap_handler callback,
|
|
u_char* userdata)
|
|
{
|
|
// Receive a single packet
|
|
@@ -268,7 +268,7 @@ pcap_create_interface(const char *device, char *errorBuffer)
|
|
}
|
|
|
|
static int
|
|
-can_be_bound(const char *name _U_)
|
|
+can_be_bound(const char *name)
|
|
{
|
|
return 1;
|
|
}
|
|
diff --git a/pcap-usb-linux-common.c b/pcap-usb-linux-common.c
|
|
index fb4a8c1..a388f8f 100644
|
|
--- a/pcap-usb-linux-common.c
|
|
+++ b/pcap-usb-linux-common.c
|
|
@@ -56,6 +56,7 @@ fix_linux_usb_mmapped_length(struct pcap_pkthdr *pkth, const u_char *bp)
|
|
(hdr->ndesc * sizeof (usb_isodesc)) + hdr->urb_len) {
|
|
usb_isodesc *descs;
|
|
u_int pre_truncation_data_len, pre_truncation_len;
|
|
+ uint32_t desc;
|
|
|
|
descs = (usb_isodesc *) (bp + sizeof(pcap_usb_header_mmapped));
|
|
|
|
@@ -76,7 +77,7 @@ fix_linux_usb_mmapped_length(struct pcap_pkthdr *pkth, const u_char *bp)
|
|
* while processing the isochronous descriptors.
|
|
*/
|
|
pre_truncation_data_len = 0;
|
|
- for (uint32_t desc = 0;
|
|
+ for (desc = 0;
|
|
desc < hdr->ndesc && bytes_left >= sizeof (usb_isodesc);
|
|
desc++, bytes_left -= sizeof (usb_isodesc)) {
|
|
u_int desc_end;
|
|
--
|
|
2.37.3
|
|
|