summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kmod/kmod
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/kmod/kmod')
-rw-r--r--meta/recipes-kernel/kmod/kmod/0001-Fix-build-with-older-gcc-4.6.patch44
-rw-r--r--meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch26
-rw-r--r--meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch16
3 files changed, 52 insertions, 34 deletions
diff --git a/meta/recipes-kernel/kmod/kmod/0001-Fix-build-with-older-gcc-4.6.patch b/meta/recipes-kernel/kmod/kmod/0001-Fix-build-with-older-gcc-4.6.patch
new file mode 100644
index 0000000000..f8ff103087
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/0001-Fix-build-with-older-gcc-4.6.patch
@@ -0,0 +1,44 @@
1Upstream-Status: Inappropriate [kmod is new]
2
3From 30e1839a46b0b9449f272765193a0da61bf85997 Mon Sep 17 00:00:00 2001
4From: Khem Raj <raj.khem@gmail.com>
5Date: Mon, 26 Aug 2013 15:32:36 -0700
6Subject: [PATCH] Fix build with older gcc < 4.6
7
8Static_assert is new feature in C11 standards and older than gcc 4.6
9does not support it. So define it to make the old gcc happy
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 libkmod/macro.h | 14 ++++++++++++--
14 1 file changed, 12 insertions(+), 2 deletions(-)
15
16diff --git a/libkmod/macro.h b/libkmod/macro.h
17index c6ba855..5032f54 100644
18--- a/libkmod/macro.h
19+++ b/libkmod/macro.h
20@@ -20,9 +20,19 @@
21 #pragma once
22
23 #include <stddef.h>
24-
25-#define assert_cc(expr) \
26+#if defined(__GNUC__)
27+/* Determine which version of GNU C we're using */
28+#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
29+#endif
30+#if (GCC_VERSION >= 40600)
31+# define assert_cc(expr) \
32 _Static_assert((expr), #expr)
33+#else
34+# define STATIC_ASSERT_GLUE1(x, y) x##y
35+# define STATIC_ASSERT_GLUE(x, y) STATIC_ASSERT_GLUE1(x, y)
36+# define assert_cc(expr) \
37+extern void STATIC_ASSERT_GLUE(static_assert, __LINE__)(int arg[(expr) ? 1 : -1]) __attribute__((unused))
38+#endif
39
40 #if HAVE_TYPEOF
41 #define check_types_match(expr1, expr2) \
42--
431.8.3.4
44
diff --git a/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch b/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch
deleted file mode 100644
index 5361b847c9..0000000000
--- a/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From ce6f0cabb65e67dd4d31e1e555db8bc6eaf435d3 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Fri, 24 Feb 2012 07:35:38 +0100
4Subject: [PATCH] man: disable man page generation because we don't have
5 working xsltproc
6
7Upstream-Status: Inappropriate [build system specific change]
8
9Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
10---
11 Makefile.am | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14diff --git a/Makefile.am b/Makefile.am
15index 141c102..a8bdfd1 100644
16--- a/Makefile.am
17+++ b/Makefile.am
18@@ -1,4 +1,4 @@
19-SUBDIRS = . libkmod/docs man
20+SUBDIRS = . libkmod/docs
21
22 DISTCLEAN_LOCAL_HOOKS =
23 EXTRA_DIST =
24--
251.7.8.4
26
diff --git a/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch b/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
index 3177e9a1a9..0268216230 100644
--- a/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
+++ b/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
@@ -2,16 +2,16 @@ Upstream-Status: Not applicable
2 2
3Index: git/libkmod/libkmod-private.h 3Index: git/libkmod/libkmod-private.h
4=================================================================== 4===================================================================
5--- git.orig/libkmod/libkmod-private.h 5--- git.orig/libkmod/libkmod-private.h 2013-08-21 10:07:51.000000000 -0700
6+++ git/libkmod/libkmod-private.h 6+++ git/libkmod/libkmod-private.h 2013-08-21 14:34:04.558278849 -0700
7@@ -1,6 +1,10 @@ 7@@ -9,6 +9,10 @@
8 #ifndef _LIBKMOD_PRIVATE_H_ 8 #include "macro.h"
9 #define _LIBKMOD_PRIVATE_H_ 9 #include "libkmod.h"
10 10
11+#ifndef O_CLOEXEC 11+#ifndef O_CLOEXEC
12+# define O_CLOEXEC 0 12+# define O_CLOEXEC 0
13+#endif 13+#endif
14+ 14+
15 #include <stdbool.h> 15 static _always_inline_ _printf_format_(2, 3) void
16 #include <stdio.h> 16 kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {}
17 #include <syslog.h> 17