Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libreswan: fix build with glibc 2.26
It is not trivial to update libreswan to 3.22 because it has added a dependency on ldns which currently depends on openssl 1.1.0, while the rest of libreswan depends on openssl 1.0.2. It compiles, but may behave unpredictably at run time. Tracking issue: #31696
- Loading branch information
Showing
2 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
pkgs/tools/networking/libreswan/libreswan-3.18-glibc-2.26.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/lib/libswan/id.c b/lib/libswan/id.c | ||
index 8f06275..efb0394 100644 | ||
--- a/lib/libswan/id.c | ||
+++ b/lib/libswan/id.c | ||
@@ -22,6 +22,7 @@ | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
#include <arpa/inet.h> | ||
+#include <limits.h> | ||
#include <unistd.h> | ||
#ifndef HOST_NAME_MAX /* POSIX 1003.1-2001 says <unistd.h> defines this */ | ||
#define HOST_NAME_MAX 255 /* upper bound, according to SUSv2 */ | ||
diff --git a/linux/include/libreswan.h b/linux/include/libreswan.h | ||
index c5efc6a..b0af4d7 100644 | ||
--- a/linux/include/libreswan.h | ||
+++ b/linux/include/libreswan.h | ||
@@ -211,6 +211,7 @@ static inline deltatime_t monotimediff(monotime_t a, monotime_t b) { | ||
#include <assert.h> | ||
#define user_assert(foo) assert(foo) | ||
#include <stdio.h> | ||
+#include <stdint.h> | ||
|
||
# define uint8_t u_int8_t | ||
# define uint16_t u_int16_t | ||
diff --git a/programs/pluto/rcv_whack.c b/programs/pluto/rcv_whack.c | ||
index 588c66c..4fc6289 100644 | ||
--- a/programs/pluto/rcv_whack.c | ||
+++ b/programs/pluto/rcv_whack.c | ||
@@ -24,6 +24,7 @@ | ||
#include <stddef.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
+#include <limits.h> | ||
#include <unistd.h> | ||
#ifndef HOST_NAME_MAX /* POSIX 1003.1-2001 says <unistd.h> defines this */ | ||
# define HOST_NAME_MAX 255 /* upper bound, according to SUSv2 */ |