diff mbox series

[meta-oe,08/63] libsmi: Fix build with clang 15

Message ID 20220904073417.3251865-8-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/63] libutempter: Upgrade to 1.2.2-alt1 | expand

Commit Message

Khem Raj Sept. 4, 2022, 7:33 a.m. UTC
Add flex and bison dependencies to make deterministic builds

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ntifierRef-prototype-in-yang-complex.patch | 53 +++++++++++++++++++
 .../recipes-support/libsmi/libsmi_0.5.0.bb    |  5 +-
 2 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/libsmi/libsmi/0001-Define-createIdentifierRef-prototype-in-yang-complex.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libsmi/libsmi/0001-Define-createIdentifierRef-prototype-in-yang-complex.patch b/meta-oe/recipes-support/libsmi/libsmi/0001-Define-createIdentifierRef-prototype-in-yang-complex.patch
new file mode 100644
index 0000000000..3374f8484e
--- /dev/null
+++ b/meta-oe/recipes-support/libsmi/libsmi/0001-Define-createIdentifierRef-prototype-in-yang-complex.patch
@@ -0,0 +1,53 @@ 
+From 77b520a8ee193b6d9f12e049f505d8d98204c11c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 31 Aug 2022 17:13:32 -0700
+Subject: [PATCH] Define createIdentifierRef prototype in yang-complex-types.c
+
+Provide needed prototype to make compiler happy
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/parser-yang.y        | 3 ++-
+ lib/yang-complex-types.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/lib/parser-yang.y
++++ b/lib/parser-yang.y
+@@ -41,7 +41,8 @@
+ #include "yang-complex-types.h"
+ #include "util.h"
+ #include "error.h"
+-    
++#include "yang-check.h"
++
+ #ifdef HAVE_DMALLOC_H
+ #include <dmalloc.h>
+ #endif
+@@ -61,7 +62,8 @@
+ #define debug
+ #endif
+ 
+-    
++extern void createIdentifierRef(struct _YangNode *node, char* prefix, char* ident);
++extern void smiyyerror(char *msg, Parser *parserPtr);
+ /*
+  * NOTE: The argument lvalp ist not really a void pointer. Unfortunately,
+  * we don't know it better at this point. bison generated C code declares
+--- a/lib/yang-complex-types.c
++++ b/lib/yang-complex-types.c
+@@ -35,12 +35,13 @@
+ #include "yang-data.h"
+ #include "yang-check.h"
+ #include "yang-complex-types.h"
+-
+ /*
+  * Current parser defined in parser-yang. Workaround - can't include data.h
+  */
+ extern Parser *currentParser;
+ 
++extern void createIdentifierRef(struct _YangNode *node, char* prefix, char* ident);
++
+ static const int parents_complex_type[] = {
+     YANG_DECL_MODULE, YANG_DECL_SUBMODULE, YANG_DECL_CONTAINER,
+     YANG_DECL_LIST, YANG_DECL_RPC, YANG_DECL_INPUT,
diff --git a/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb b/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb
index b238671893..53c59de78a 100644
--- a/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb
+++ b/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb
@@ -7,14 +7,17 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=3ad3076f9332343a21636cfd351f05b7"
 SRC_URI = "https://www.ibr.cs.tu-bs.de/projects/${BPN}/download/${BP}.tar.gz \
            file://smi.conf \
            file://libsmi-fix-the-test-dump-files.patch \
+           file://0001-Define-createIdentifierRef-prototype-in-yang-complex.patch \
           "
 
 SRC_URI[md5sum] = "4bf47483c06c9f07d1b10fbc74eddf11"
 SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3"
 
+DEPENDS += "bison-native flex-native"
+
 RDEPENDS:${PN} += "wget"
 
-inherit autotools
+inherit autotools-brokensep
 
 EXTRA_OECONF = "ac_cv_path_SH=/bin/sh ac_cv_path_WGET=${bindir}/wget ac_cv_path_AWK=${bindir}/awk"