Yocto 2.3

Move OpenBMC to Yocto 2.3(pyro).

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch
new file mode 100644
index 0000000..630ecdb
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch
@@ -0,0 +1,249 @@
+From 7d9585be093c9cb2428b373c0b0088bb778942d0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 Mar 2017 21:37:47 -0700
+Subject: [PATCH] Fix header issues found with musl libc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libipsec/ipsec_strerror.h         | 3 +++
+ src/libipsec/libpfkey.h               | 4 +++-
+ src/racoon/admin.c                    | 2 +-
+ src/racoon/backupsa.c                 | 6 +++---
+ src/racoon/cftoken.l                  | 4 ++++
+ src/racoon/logger.h                   | 3 +++
+ src/racoon/misc.h                     | 3 +++
+ src/racoon/missing/crypto/sha2/sha2.h | 3 +++
+ src/racoon/netdb_dnssec.h             | 3 +++
+ src/racoon/pfkey.c                    | 1 -
+ src/racoon/plog.h                     | 2 ++
+ src/racoon/str2val.h                  | 3 +++
+ src/racoon/vmbuf.h                    | 3 +++
+ src/setkey/extern.h                   | 3 ++-
+ src/setkey/setkey.c                   | 1 -
+ 15 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/src/libipsec/ipsec_strerror.h b/src/libipsec/ipsec_strerror.h
+index 2b4264f..dac66a1 100644
+--- a/src/libipsec/ipsec_strerror.h
++++ b/src/libipsec/ipsec_strerror.h
+@@ -34,6 +34,9 @@
+ #ifndef _IPSEC_STRERROR_H
+ #define _IPSEC_STRERROR_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ extern int __ipsec_errcode;
+ extern void __ipsec_set_strerror __P((const char *));
+ 
+diff --git a/src/libipsec/libpfkey.h b/src/libipsec/libpfkey.h
+index 61d2f2a..f7991b7 100644
+--- a/src/libipsec/libpfkey.h
++++ b/src/libipsec/libpfkey.h
+@@ -34,6 +34,9 @@
+ #ifndef _LIBPFKEY_H
+ #define _LIBPFKEY_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ #ifndef KAME_LIBPFKEY_H
+ #define KAME_LIBPFKEY_H
+ 
+@@ -43,7 +46,6 @@
+ 
+ #define PRIORITY_OFFSET_POSITIVE_MAX	0x3fffffff
+ #define PRIORITY_OFFSET_NEGATIVE_MAX	0x40000000
+-
+ struct sadb_msg;
+ extern void pfkey_sadump __P((struct sadb_msg *));
+ extern void pfkey_sadump_withports __P((struct sadb_msg *));
+diff --git a/src/racoon/admin.c b/src/racoon/admin.c
+index 4b1875b..03ea3f8 100644
+--- a/src/racoon/admin.c
++++ b/src/racoon/admin.c
+@@ -36,7 +36,6 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
+-#include <sys/signal.h>
+ #include <sys/stat.h>
+ #include <sys/un.h>
+ 
+@@ -46,6 +45,7 @@
+ #include PATH_IPSEC_H
+ 
+ 
++#include <signal.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/src/racoon/backupsa.c b/src/racoon/backupsa.c
+index 82d74ca..95307ca 100644
+--- a/src/racoon/backupsa.c
++++ b/src/racoon/backupsa.c
+@@ -276,9 +276,9 @@ do { 								\
+ 		GETNEXTNUM(sa_args.a_keylen, strtoul);
+ 		GETNEXTNUM(sa_args.flags, strtoul);
+ 		GETNEXTNUM(sa_args.l_alloc, strtoul);
+-		GETNEXTNUM(sa_args.l_bytes, strtouq);
+-		GETNEXTNUM(sa_args.l_addtime, strtouq);
+-		GETNEXTNUM(sa_args.l_usetime, strtouq);
++		GETNEXTNUM(sa_args.l_bytes, strtoull);
++		GETNEXTNUM(sa_args.l_addtime, strtoull);
++		GETNEXTNUM(sa_args.l_usetime, strtoull);
+ 		GETNEXTNUM(sa_args.seq, strtoul);
+ 
+ #undef GETNEXTNUM
+diff --git a/src/racoon/cftoken.l b/src/racoon/cftoken.l
+index 1701922..787f4a9 100644
+--- a/src/racoon/cftoken.l
++++ b/src/racoon/cftoken.l
+@@ -77,6 +77,10 @@
+ 
+ #include "cfparse.h"
+ 
++#ifndef GLOB_TILDE
++#define GLOB_TILDE 0
++#endif
++
+ int yyerrorcount = 0;
+ 
+ #if defined(YIPS_DEBUG)
+diff --git a/src/racoon/logger.h b/src/racoon/logger.h
+index 3fd3e94..67af5f0 100644
+--- a/src/racoon/logger.h
++++ b/src/racoon/logger.h
+@@ -34,6 +34,9 @@
+ #ifndef _LOGGER_H
+ #define _LOGGER_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ struct log {
+ 	int head;
+ 	int siz;
+diff --git a/src/racoon/misc.h b/src/racoon/misc.h
+index 3e758d9..30d9825 100644
+--- a/src/racoon/misc.h
++++ b/src/racoon/misc.h
+@@ -34,6 +34,9 @@
+ #ifndef _MISC_H
+ #define _MISC_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ #define BIT2STR(b) bit2str(b, sizeof(b)<<3)
+ 
+ #ifdef HAVE_FUNC_MACRO
+diff --git a/src/racoon/missing/crypto/sha2/sha2.h b/src/racoon/missing/crypto/sha2/sha2.h
+index 42bcc2a..c043dfe 100644
+--- a/src/racoon/missing/crypto/sha2/sha2.h
++++ b/src/racoon/missing/crypto/sha2/sha2.h
+@@ -40,6 +40,9 @@
+ #ifndef __SHA2_H__
+ #define __SHA2_H__
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff --git a/src/racoon/netdb_dnssec.h b/src/racoon/netdb_dnssec.h
+index a11209d..98fd813 100644
+--- a/src/racoon/netdb_dnssec.h
++++ b/src/racoon/netdb_dnssec.h
+@@ -34,6 +34,9 @@
+ #ifndef _NETDB_DNSSEC_H
+ #define _NETDB_DNSSEC_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ #ifndef T_CERT
+ #define T_CERT	37		/* defined by RFC2538 section 2 */
+ #endif
+diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c
+index 8f26c19..a06c30e 100644
+--- a/src/racoon/pfkey.c
++++ b/src/racoon/pfkey.c
+@@ -59,7 +59,6 @@
+ #include <sys/param.h>
+ #include <sys/socket.h>
+ #include <sys/queue.h>
+-#include <sys/sysctl.h>
+ 
+ #include <net/route.h>
+ #include <net/pfkeyv2.h>
+diff --git a/src/racoon/plog.h b/src/racoon/plog.h
+index ed43c8b..920c850 100644
+--- a/src/racoon/plog.h
++++ b/src/racoon/plog.h
+@@ -34,6 +34,8 @@
+ #ifndef _PLOG_H
+ #define _PLOG_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
+ #ifdef HAVE_STDARG_H
+ #include <stdarg.h>
+ #else
+diff --git a/src/racoon/str2val.h b/src/racoon/str2val.h
+index 4a7cec1..d3d698e 100644
+--- a/src/racoon/str2val.h
++++ b/src/racoon/str2val.h
+@@ -34,6 +34,9 @@
+ #ifndef _STR2VAL_H
+ #define _STR2VAL_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ extern caddr_t val2str __P((const char *, size_t));
+ extern char *str2val __P((const char *, int, size_t *));
+ 
+diff --git a/src/racoon/vmbuf.h b/src/racoon/vmbuf.h
+index 3f2f4ea..8287a00 100644
+--- a/src/racoon/vmbuf.h
++++ b/src/racoon/vmbuf.h
+@@ -34,6 +34,9 @@
+ #ifndef _VMBUF_H
+ #define _VMBUF_H
+ 
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
++
+ /*
+  *	bp      v
+  *	v       v
+diff --git a/src/setkey/extern.h b/src/setkey/extern.h
+index 6f439fa..a1d9d14 100644
+--- a/src/setkey/extern.h
++++ b/src/setkey/extern.h
+@@ -1,6 +1,7 @@
+ /*	$NetBSD: extern.h,v 1.5 2009/03/06 11:45:03 tteras Exp $	*/
+ 
+-
++#undef __P
++#define __P(protos)     protos          /* ANSI C prototypes */
+ 
+ void parse_init __P((void));
+ int parse __P((FILE **));
+diff --git a/src/setkey/setkey.c b/src/setkey/setkey.c
+index c400faa..51f8b75 100644
+--- a/src/setkey/setkey.c
++++ b/src/setkey/setkey.c
+@@ -40,7 +40,6 @@
+ #include <sys/socket.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
+-#include <sys/sysctl.h>
+ #include <err.h>
+ #include <netinet/in.h>
+ #include <net/pfkeyv2.h>
+-- 
+2.12.0
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch
new file mode 100644
index 0000000..e9dd84a
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch
@@ -0,0 +1,30 @@
+From a5c59f6a1479947d33dba5191724cc5fc88a614b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Apr 2017 10:39:57 -0700
+Subject: [PATCH 2/2] cfparse: clear memory equal to size of array
+
+Fixes compiler error
+cfparse.y: In function 'set_isakmp_proposal':
+cfparse.y:2567:3: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/racoon/cfparse.y | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/racoon/cfparse.y b/src/racoon/cfparse.y
+index 0d9bd67..5d9c67b 100644
+--- a/src/racoon/cfparse.y
++++ b/src/racoon/cfparse.y
+@@ -2564,7 +2564,7 @@ set_isakmp_proposal(rmconf)
+ 		plog(LLV_DEBUG2, LOCATION, NULL,
+ 			"encklen=%d\n", s->encklen);
+ 
+-		memset(types, 0, ARRAYLEN(types));
++		memset(types, 0, sizeof(types));
+ 		types[algclass_isakmp_enc] = s->algclass[algclass_isakmp_enc];
+ 		types[algclass_isakmp_hash] = s->algclass[algclass_isakmp_hash];
+ 		types[algclass_isakmp_dh] = s->algclass[algclass_isakmp_dh];
+-- 
+2.12.2
+
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
index bf89927..d7e8b25 100644
--- a/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
+++ b/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
@@ -22,7 +22,9 @@
            file://racoon.service \
            file://fix-CVE-2015-4047.patch \
            file://0001-Fix-build-with-clang.patch \
-          "
+           file://0001-Fix-header-issues-found-with-musl-libc.patch \
+           file://0002-cfparse-clear-memory-equal-to-size-of-array.patch \
+           "
 SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
 SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"