From 596abc4c17be0e6e355532ff29dd0eb95915f95d Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Mon, 18 Dec 2006 12:10:38 +0000 Subject: [PATCH] fix build on 2.6.19 (closes: #1070), fix missing process name in syslog (closes: #1069), thanks to Wolfgang Breyha for the patches. SVN-Revision: 5836 --- .../02-linux_2.6.19_rtnetlink_changes.patch | 22 +++++++++++++++++++ net/srelay/patches/03-openlog.patch | 20 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 net/srelay/patches/02-linux_2.6.19_rtnetlink_changes.patch create mode 100644 net/srelay/patches/03-openlog.patch diff --git a/net/srelay/patches/02-linux_2.6.19_rtnetlink_changes.patch b/net/srelay/patches/02-linux_2.6.19_rtnetlink_changes.patch new file mode 100644 index 000000000..96c783c1d --- /dev/null +++ b/net/srelay/patches/02-linux_2.6.19_rtnetlink_changes.patch @@ -0,0 +1,22 @@ +diff -ruN srelay-0.4.6-old/get-bind.c srelay-0.4.6-new/get-bind.c +--- srelay-0.4.6-old/get-bind.c 2003-04-10 04:53:17.000000000 +0200 ++++ srelay-0.4.6-new/get-bind.c 2006-12-18 12:53:06.000000000 +0100 +@@ -50,6 +50,18 @@ + #include + #include + #include ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) ++# include ++#endif ++#ifndef IFA_RTA ++# define IFA_RTA(r) ((struct rtattr *) ((char *)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg)))) ++# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg)) ++#endif ++#ifndef IFLA_RTA ++# define IFLA_RTA(r) ((struct rtattr *) ((char *)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg)))) ++# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg)) ++#endif + + static int get_ifconf(int, struct addrinfo *); + #endif /* defined(LINUX) */ diff --git a/net/srelay/patches/03-openlog.patch b/net/srelay/patches/03-openlog.patch new file mode 100644 index 000000000..9f3f8740c --- /dev/null +++ b/net/srelay/patches/03-openlog.patch @@ -0,0 +1,20 @@ +diff -Naurp srelay-0.4.6.orig/main.c srelay-0.4.6/main.c +--- srelay-0.4.6.orig/main.c 2006-12-13 22:58:39.000000000 +0100 ++++ srelay-0.4.6/main.c 2006-12-13 23:02:59.000000000 +0100 +@@ -33,6 +33,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DA + */ + + #include ++#include + #include "srelay.h" + + /* prototypes */ +@@ -125,6 +126,8 @@ int main(int ac, char **av) + + uid = getuid(); + ++ openlog("srelay", LOG_PID, LOG_DAEMON); ++ + while((ch = getopt(ac, av, "a:c:i:m:o:p:u:frstbvh?")) != -1) + switch (ch) { + case 'a': -- 2.30.2