diff options
Diffstat (limited to 'patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch')
-rw-r--r-- | patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch b/patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch new file mode 100644 index 000000000..640acba5a --- /dev/null +++ b/patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch @@ -0,0 +1,42 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Mon, 18 Apr 2016 12:22:22 +0200 +Subject: [PATCH] HACK: fix building without linux/sctp.h + +linux/sctp.h exists since kernel 3.10. + +Upstream requires kernel 3.11 but this is useful for host-systemd. + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + configure.ac | 1 + + src/core/socket.c | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 650a5be1edf2..f7eb2c4f963f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -292,6 +292,7 @@ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers n + AC_CHECK_HEADERS([linux/btrfs.h], [], []) + AC_CHECK_HEADERS([linux/memfd.h], [], []) + AC_CHECK_HEADERS([uchar.h], [], []) ++AC_CHECK_HEADERS([linux/sctp.h], [], []) + + # unconditionally pull-in librt with old glibc versions + AC_SEARCH_LIBS([clock_gettime], [rt], [], []) +diff --git a/src/core/socket.c b/src/core/socket.c +index f6204d04bfd8..212ff2dd913d 100644 +--- a/src/core/socket.c ++++ b/src/core/socket.c +@@ -26,7 +26,11 @@ + #include <sys/epoll.h> + #include <sys/stat.h> + #include <unistd.h> ++#ifdef HAVE_LINUX_SCTP_H + #include <linux/sctp.h> ++#else ++#define SCTP_NODELAY 3 ++#endif + + #include "alloc-util.h" + #include "bus-error.h" |