Skip to content

Commit

Permalink
patch updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchcapper committed Dec 7, 2024
1 parent 7eb0a29 commit f8d79ac
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 87 deletions.
14 changes: 8 additions & 6 deletions patches/repo_coreutils.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ index b7aa853af..8cc8eab8a 100644
{
error (0, 0, _("%s: input file is output file"), quotef (infile));
diff --git a/src/cksum.c b/src/cksum.c
index 5900d141e..abd846e51 100644
index 489af7e52..579688556 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -267,13 +267,21 @@ crc_sum_stream (FILE *stream, void *resstream, uintmax_t *length)
@@ -291,15 +291,23 @@ crc_sum_stream (FILE *stream, void *resstream, uintmax_t *length)
static bool (*cksum_fp) (FILE *, uint_fast32_t *, uintmax_t *);
if (! cksum_fp)
{
Expand All @@ -43,6 +43,8 @@ index 5900d141e..abd846e51 100644
+#if USE_PCLMUL_CRC32
+ if (pclmul_supported ())
cksum_fp = cksum_pclmul;
else if (vmull_supported ())
cksum_fp = cksum_vmull;
else
+#endif
cksum_fp = cksum_slice8;
Expand Down Expand Up @@ -1402,7 +1404,7 @@ index ea30fb4b6..dae868d4e 100644
{
/* TRANSLATORS: Replace LANG_CODE in this URL with your language code
diff --git a/src/tail.c b/src/tail.c
index 33acf9ab3..00b9944b9 100644
index 8cefb9c07..6bfcee6c6 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -48,6 +48,9 @@
Expand Down Expand Up @@ -1462,7 +1464,7 @@ index 33acf9ab3..00b9944b9 100644
if (writers_dead || sleep_interval <= 0)
delay = 0;
else if (sleep_interval < INT_MAX / 1000 - 1)
@@ -1997,6 +2005,21 @@ tail (char const *filename, int fd, uintmax_t n_units,
@@ -1998,6 +2006,21 @@ tail (char const *filename, int fd, uintmax_t n_units,
return tail_bytes (filename, fd, n_units, read_pos);
}

Expand All @@ -1484,7 +1486,7 @@ index 33acf9ab3..00b9944b9 100644
/* Display the last N_UNITS units of the file described by F.
Return true if successful. */

@@ -2015,7 +2038,8 @@ tail_file (struct File_spec *f, uintmax_t n_units)
@@ -2016,7 +2039,8 @@ tail_file (struct File_spec *f, uintmax_t n_units)
xset_binary_mode (STDIN_FILENO, O_BINARY);
}
else
Expand All @@ -1494,7 +1496,7 @@ index 33acf9ab3..00b9944b9 100644

f->tailable = !(reopen_inaccessible_files && fd == -1);

@@ -2315,7 +2339,11 @@ parse_options (int argc, char **argv,
@@ -2316,7 +2340,11 @@ parse_options (int argc, char **argv,
if (nbpids && !forever)
error (0, 0,
_("warning: PID ignored; --pid=PID is useful only when following"));
Expand Down
175 changes: 94 additions & 81 deletions patches/repo_wget.patch
Original file line number Diff line number Diff line change
@@ -1,81 +1,94 @@
diff --git a/src/gnutls.c b/src/gnutls.c
index 689c9e41..c069c114 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -802,7 +802,7 @@ set_prio_default (gnutls_session_t session)
case secure_protocol_sslv2:
case secure_protocol_sslv3:
allowed_protocols[0] = GNUTLS_SSL3;
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1:
@@ -812,7 +812,7 @@ set_prio_default (gnutls_session_t session)
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[3] = GNUTLS_TLS1_3;
#endif
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1_1:
@@ -821,7 +821,7 @@ set_prio_default (gnutls_session_t session)
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[2] = GNUTLS_TLS1_3;
#endif
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1_2:
@@ -829,13 +829,13 @@ set_prio_default (gnutls_session_t session)
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[1] = GNUTLS_TLS1_3;
#endif
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1_3:
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[0] = GNUTLS_TLS1_3;
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;
#else
logprintf (LOG_NOTQUIET, _("Your GnuTLS version is too old to support TLS 1.3\n"));
diff --git a/src/init.c b/src/init.c
index 69f91ad5..da74089b 100644
--- a/src/init.c
+++ b/src/init.c
@@ -40,7 +40,11 @@ as that of the covered work. */
#include <limits.h>
/* not all systems provide PATH_MAX in limits.h */
#ifndef PATH_MAX
+#ifndef _WIN32
# include <sys/param.h>
+#else
+# include <pathmax.h>
+#endif
# ifndef PATH_MAX
# define PATH_MAX MAXPATHLEN
# endif
diff --git a/src/utils.c b/src/utils.c
index 794d3a57..59d7de7b 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -36,6 +36,13 @@ as that of the covered work. */
#include <string.h>
#include <time.h>
#include <unistd.h>
+#ifndef PATH_MAX
+#ifndef _WIN32
+# include <sys/param.h>
+#else
+# include <pathmax.h>
+#endif
+#endif
#ifdef HAVE_PROCESS_H
# include <process.h> /* getpid() */
#endif
diff --git a/src/gnutls.c b/src/gnutls.c
index cfcdf671..4d648639 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -802,7 +802,7 @@ set_prio_default (gnutls_session_t session)
case secure_protocol_sslv2:
case secure_protocol_sslv3:
allowed_protocols[0] = GNUTLS_SSL3;
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1:
@@ -812,7 +812,7 @@ set_prio_default (gnutls_session_t session)
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[3] = GNUTLS_TLS1_3;
#endif
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1_1:
@@ -821,7 +821,7 @@ set_prio_default (gnutls_session_t session)
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[2] = GNUTLS_TLS1_3;
#endif
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1_2:
@@ -829,13 +829,13 @@ set_prio_default (gnutls_session_t session)
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[1] = GNUTLS_TLS1_3;
#endif
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;

case secure_protocol_tlsv1_3:
#if GNUTLS_VERSION_NUMBER >= 0x030603
allowed_protocols[0] = GNUTLS_TLS1_3;
- err = gnutls_protocol_set_priority (session, allowed_protocols);
+ err = gnutls_priority_set_direct (session, allowed_protocols, NULL);
break;
#else
logprintf (LOG_NOTQUIET, _("Your GnuTLS version is too old to support TLS 1.3\n"));
diff --git a/src/init.c b/src/init.c
index 1c452836..a0d283db 100644
--- a/src/init.c
+++ b/src/init.c
@@ -40,7 +40,11 @@ as that of the covered work. */
#include <limits.h>
/* not all systems provide PATH_MAX in limits.h */
#ifndef PATH_MAX
+#ifndef _WIN32
# include <sys/param.h>
+#else
+# include <pathmax.h>
+#endif
# ifndef PATH_MAX
# define PATH_MAX MAXPATHLEN
# endif
diff --git a/src/utils.c b/src/utils.c
index 2511a25f..e5ea9064 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -36,6 +36,13 @@ as that of the covered work. */
#include <string.h>
#include <time.h>
#include <unistd.h>
+#ifndef PATH_MAX
+#ifndef _WIN32
+# include <sys/param.h>
+#else
+# include <pathmax.h>
+#endif
+#endif
#ifdef HAVE_PROCESS_H
# include <process.h> /* getpid() */
#endif
diff --git a/src/wget.h b/src/wget.h
index 47fcb6db..cc66e081 100644
--- a/src/wget.h
+++ b/src/wget.h
@@ -224,7 +224,7 @@ static inline unsigned char _unhex(unsigned char c)
void *basevar_new = xrealloc (basevar, DR_newsize * sizeof (type)); \
assert(basevar_new); \
if (basevar_new != basevar) { \
- memset (basevar_new + sizevar_old * sizeof (type), 0, (DR_newsize - sizevar_old) * sizeof (type)); \
+ memset (((char*)basevar_new) + sizevar_old * sizeof (type), 0, (DR_newsize - sizevar_old) * sizeof (type)); \
basevar = basevar_new; \
} \
} \

0 comments on commit f8d79ac

Please sign in to comment.