diff options
author | dengke.du@windriver.com <dengke.du@windriver.com> | 2016-10-19 13:27:00 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-11-14 10:07:19 -0500 |
commit | c8f78ecb9b8a39a955631ca1a415d94da588bc26 (patch) | |
tree | 0206a7da44207b791cdb4d982ffc464064d5e630 /meta-networking | |
parent | 7a491f384c277ee42ac895fec6fc2ef70f15df4d (diff) | |
download | meta-openembedded-c8f78ecb9b8a39a955631ca1a415d94da588bc26.tar.gz |
linux-atm: fix do_compile error
With linux kernel v4.8, for file ./src/maint/zntune.c, glibc time.h is
included before linux time.h, when compile zntune.c, it break down by
the following errors:
redefinition of 'struct timespec' 'struct timeval'
'struct timezone' 'struct itimerval'
We should exclude the linux time.h by disable linux/atm_zatm.h and move
some useful definition in linux/atm_zatm.h to a new header file in linux-atm
source code to resolve it.
Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch | 74 | ||||
-rw-r--r-- | meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb | 4 |
2 files changed, 77 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch b/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch new file mode 100644 index 000000000..583a6ca60 --- /dev/null +++ b/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 7cdafc0dee8054f82777ed3bf6d4c8b5582d09ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Dengke Du <dengke.du@windriver.com> | ||
3 | Date: Tue, 18 Oct 2016 07:56:02 +0000 | ||
4 | Subject: [PATCH] fix compile error with linux kernel v4.8 | ||
5 | |||
6 | In src/maint/zntune.c, the glibc time.h is included before linux | ||
7 | time.h, so when compile the zntune.c, it break down by errors: | ||
8 | |||
9 | redefinition of 'struct timespec' 'struct timeval' | ||
10 | 'struct timezone' 'struct itimerval' | ||
11 | |||
12 | We should exclude the linux time.h by disable linux/atm_zatm.h and | ||
13 | move some useful definition in linux/atm_zatm.h to zntune.c to resolve | ||
14 | it. | ||
15 | |||
16 | Upstream-status: Pending | ||
17 | |||
18 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
19 | --- | ||
20 | src/include/atm_zatm.h | 26 ++++++++++++++++++++++++++ | ||
21 | src/maint/zntune.c | 3 +-- | ||
22 | 2 files changed, 27 insertions(+), 2 deletions(-) | ||
23 | create mode 100644 src/include/atm_zatm.h | ||
24 | |||
25 | diff --git a/src/include/atm_zatm.h b/src/include/atm_zatm.h | ||
26 | new file mode 100644 | ||
27 | index 0000000..7d64f4d | ||
28 | --- /dev/null | ||
29 | +++ b/src/include/atm_zatm.h | ||
30 | @@ -0,0 +1,26 @@ | ||
31 | +#include <linux/atmapi.h> | ||
32 | +#include <linux/atmioc.h> | ||
33 | + | ||
34 | +#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc) | ||
35 | + /* get pool statistics */ | ||
36 | +#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc) | ||
37 | + /* get statistics and zero */ | ||
38 | +#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc) | ||
39 | + | ||
40 | +struct zatm_pool_info { | ||
41 | + int ref_count; /* free buffer pool usage counters */ | ||
42 | + int low_water,high_water; /* refill parameters */ | ||
43 | + int rqa_count,rqu_count; /* queue condition counters */ | ||
44 | + int offset,next_off; /* alignment optimizations: offset */ | ||
45 | + int next_cnt,next_thres; /* repetition counter and threshold */ | ||
46 | +}; /* set pool parameters */ | ||
47 | + | ||
48 | +struct zatm_pool_req { | ||
49 | + int pool_num; /* pool number */ | ||
50 | + struct zatm_pool_info info; /* actual information */ | ||
51 | +}; | ||
52 | + | ||
53 | +#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */ | ||
54 | +#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */ | ||
55 | +#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */ | ||
56 | +#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */ | ||
57 | diff --git a/src/maint/zntune.c b/src/maint/zntune.c | ||
58 | index 62d62ab..bb93eab 100644 | ||
59 | --- a/src/maint/zntune.c | ||
60 | +++ b/src/maint/zntune.c | ||
61 | @@ -13,9 +13,8 @@ | ||
62 | #include <sys/socket.h> | ||
63 | #include <sys/ioctl.h> | ||
64 | #include <atm.h> | ||
65 | +#include <atm_zatm.h> | ||
66 | #include <sys/time.h> /* for struct timeval, although it's not used */ | ||
67 | -#include <linux/atm_zatm.h> | ||
68 | - | ||
69 | |||
70 | static void usage(const char *name) | ||
71 | { | ||
72 | -- | ||
73 | 2.9.0 | ||
74 | |||
diff --git a/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb index edfb045a9..6ab8b07d0 100644 --- a/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb +++ b/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb | |||
@@ -9,7 +9,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
9 | 9 | ||
10 | SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ | 10 | SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ |
11 | file://link-with-ldflags.patch \ | 11 | file://link-with-ldflags.patch \ |
12 | file://install-from-buildir.patch" | 12 | file://install-from-buildir.patch \ |
13 | file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \ | ||
14 | " | ||
13 | 15 | ||
14 | SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8" | 16 | SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8" |
15 | SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a" | 17 | SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a" |