[PATCH 53/73] pcmciautils: Fix parallel build and include sys/types.h

Khem Raj
2016-01-17T11:37:46Z

parallel build patch was removing dependencies on .c files mistakenly
just adding src/yacc_config.h to dependencies in existing rule should
have fixed the original build race

include sys/types.h in lex_config.l for getting u_long definition

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../0001-fix-a-parallel-building-issue.patch | 18 +++++++-----------
.../pcmciautils/pcmciautils-018/lex_sys_types.patch | 21 +++++++++++++++++++++
meta/recipes-bsp/pcmciautils/pcmciautils_018.bb | 1 +
3 files changed, 29 insertions(+), 11 deletions(-)
create mode 100644 meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch

diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch b/meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch
index 7b01040..3125df4 100644
--- a/meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch
+++ b/meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch
@@ -26,20 +26,16 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

-diff --git a/Makefile b/Makefile
-index d45fdc3..4c53bc2 100644
---- a/Makefile
-+++ b/Makefile
-@@ -246,8 +246,7 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/startup.o src/yacc_config.o src/lex_config
+Index: pcmciautils-018/Makefile
+===================================================================
+--- pcmciautils-018.orig/Makefile
++++ pcmciautils-018/Makefile
+@@ -246,7 +246,7 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
$(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
$(QUIET) $(STRIPCMD) $@

-yacc_config.o lex_config.o: %.o: %.c
-- $(CC) -c -MD -O -pipe $(CPPFLAGS) $<
-+src/lex_config.o:src/yacc_config.h
++yacc_config.o lex_config.o: %.o: %.c src/yacc_config.h
+ $(CC) -c -MD -O -pipe $(CPPFLAGS) $<

debugtools: ccdv $(CBDUMP) $(CISDUMP)
-
---
-1.9.1
-
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch b/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
new file mode 100644
index 0000000..d4c2bed
--- /dev/null
+++ b/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
@@ -0,0 +1,21 @@
+Include sys/types.h for u_long definition
+
+Fix errors like
+In file included from src/lex_config.l:34:0:
+src/yacc_config.y:45:5: error: unknown type name 'u_long'
+ u_long num;
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: pcmciautils-018/src/lex_config.l
+===================================================================
+--- pcmciautils-018.orig/src/lex_config.l
++++ pcmciautils-018/src/lex_config.l
+@@ -22,6 +22,7 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <syslog.h>
++#include <sys/types.h>
+
+ #ifdef HAS_WORDEXP
+ #include <wordexp.h>
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb b/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
index 6a1c366..5c34081 100644
--- a/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
+++ b/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
@@ -2,6 +2,7 @@ require pcmciautils.inc

SRC_URI += "file://makefile_fix.patch \
file://0001-fix-a-parallel-building-issue.patch \
+ file://lex_sys_types.patch \
"

SRC_URI[md5sum] = "5d85669b3440baa4532363da6caaf1b4"
--
2.7.0