Skip to contentSkip to conversation

minicoredumper: Initialize struct config

PATCH New Khem Raj 1 participant 7 messages Jul 26, 2017 Arm/actions semi architecture

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/7 minicoredumper: Initialize struct config

Fixes build error with clang

---
 ...per-Initialize-pointer-to-config-struct-t.patch | 29 ++++++++++++++++++++++
 .../minicoredumper/minicoredumper_2.0.0.bb         |  3 ++-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-kernel/minicoredumper/files/0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch
meta-oe/recipes-kernel/minicoredumper/files/0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch new file +29 -0
new file mode 100644
index 000000000..ad255fae0
@@ -0,0 +1,29 @@
+From 6181d9c3c407ee030b4c3a94045318b9e3a3cc89 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 25 Jul 2017 14:08:54 -0700
+Subject: [PATCH] minicoredumper: Initialize pointer to config struct to null
+
+Fixes
+corestripper.c:3632:13: error: variable 'cfg' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/minicoredumper/corestripper.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/minicoredumper/corestripper.c b/src/minicoredumper/corestripper.c
+index a764073..ddb0d25 100644
+--- a/src/minicoredumper/corestripper.c
++++ b/src/minicoredumper/corestripper.c
+@@ -3605,7 +3605,7 @@ out:
+ 
+ static int do_all_dumps(struct dump_info *di, int argc, char *argv[])
+ {
+-	struct config *cfg;
++	struct config *cfg = 0;
+ 	const char *recept;
+ 	bool live_dumper;
+ 	char *comm_base;
+-- 
+2.13.3
+
meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.0.bb +2 -1
index 58cd45a53..3bf9f66b9 100644
@@ -16,7 +16,8 @@ PR .= "+git${SRCPV}"
 SRC_URI = "git://github.com/Linutronix/minicoredumper-debian;branch=unstable \
            file://minicoredumper.service \
            file://minicoredumper.init \
-"
+           file://0001-minicoredumper-Initialize-pointer-to-config-struct-t.patch \
+           "
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.13.3
author
#1 lore raw

PATCH 2/7 cherokee: Upgrade to 1.2.104+git

Use git fetcher to use tip of tree, the tree does not get frequent fixes. Its not disruptive to use git fetcher

---
 ...figure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch | 30 ++++++++++++++++++++++
 .../cherokee/0001-make-Do-not-build-po-files.patch | 27 +++++++++++++++++++
 .../{cherokee_1.2.98.bb => cherokee_git.bb}        | 16 +++++++-----
 3 files changed, 66 insertions(+), 7 deletions(-)
 create mode 100644 meta-webserver/recipes-httpd/cherokee/cherokee/0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch
 create mode 100644 meta-webserver/recipes-httpd/cherokee/cherokee/0001-make-Do-not-build-po-files.patch
 rename meta-webserver/recipes-httpd/cherokee/{cherokee_1.2.98.bb => cherokee_git.bb} (82%)
meta-webserver/recipes-httpd/cherokee/cherokee/0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch new file +30 -0
new file mode 100644
index 000000000..f3be7c6e5
@@ -0,0 +1,30 @@
+From 4591b5b40d66c19edc73b951ad091dac639454c9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 25 Jul 2017 16:00:34 -0700
+Subject: [PATCH] configure.ac: Add foreign to AM_INIT_AUTOMAKE
+
+Fixes errors like
+| Makefile.am: error: required file './README' not found
+| Makefile.am: error: required file './ChangeLog' not found
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d6298f27..98cab791 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,7 +32,7 @@ dnl Init autoconf and automake
+ AC_INIT([cherokee], [cherokee_version], [http://bugs.cherokee-project.com/], [cherokee])
+ AC_CONFIG_SRCDIR([cherokee/server.c])
+ AC_CONFIG_MACRO_DIR([m4])
+-AM_INIT_AUTOMAKE([no-define])
++AM_INIT_AUTOMAKE([no-define foreign])
+ 
+ dnl Define version
+ AC_DEFINE(PACKAGE_MAJOR_VERSION, "cherokee_major_version", [Version string])
+-- 
+2.13.3
+
meta-webserver/recipes-httpd/cherokee/cherokee/0001-make-Do-not-build-po-files.patch new file +27 -0
new file mode 100644
index 000000000..d4c0b6e8c
@@ -0,0 +1,27 @@
+From e9ae3231ec188df801fe51aa95d6afec2e52db58 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 25 Jul 2017 16:14:19 -0700
+Subject: [PATCH] make: Do not build po files
+
+Target fails to build
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index f01278c3..eb864c36 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,6 @@
+ ## Cherokee: Makefile.am  -*- makefile -*-
+ 
+-SUBDIRS = po m4 www icons themes qa doc . admin contrib cherokee cget packages dbslayer
++SUBDIRS = m4 www icons themes qa doc . admin contrib cherokee cget packages dbslayer
+ SUFFIXES = .sample.pre .sample .h.pre .h .xml.pre .xml
+ ACLOCAL_AMFLAGS = -I m4
+ 
+-- 
+2.13.3
+
meta-webserver/recipes-httpd/cherokee/cherokee_git.bb renamed from meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb +9 -7
similarity index 82%
rename from meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb
rename to meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
index ba39f97e9..3f7eae4c1 100644
@@ -5,19 +5,21 @@ SECTION = "network"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-PR = "r9"
+DEPENDS = "unzip-native libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
-DEPENDS = "libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-SRC_URI = "http://mirror.aarnet.edu.au/pub/${BPN}/1.2/${PV}/${BP}.tar.gz \
+SRCREV = "75f041e2255e6dd0692db2f14611c2647dbe8425"
+PV = "1.2.104+git${SRCPV}"
+SRC_URI = "git://github.com/cherokee/webserver \
            file://cherokee.init \
            file://cherokee.service \
            file://cherokee-install-configured.py-once.patch \
+           file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \
+           file://0001-make-Do-not-build-po-files.patch \
 "
-SRC_URI[md5sum] = "21b01e7d45c0e82ecc0c4257a9c27feb"
-SRC_URI[sha256sum] = "042b5687b1a3db3ca818167548ce5d32c35e227c6640732dcb622a6f4a078b7d"
 
-inherit autotools pkgconfig binconfig update-rc.d systemd
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd pythonnative
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
Signature · 1 line
2.13.3
author
#2 lore raw

PATCH 3/7 libesmtp: Fix config.h define for snprintf detection

In reply to Khem Raj
---
 .../recipes-support/libesmtp/libesmtp/snprintf.patch  | 19 +++++++++++++++++++
 .../recipes-support/libesmtp/libesmtp_1.0.6.bb        |  4 +++-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch
meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch new file +19 -0
new file mode 100644
index 000000000..d0d203ead
@@ -0,0 +1,19 @@
+Use HAVE_WORKING_SNPRINTF to check for snprintf()
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: libesmtp-1.0.6/missing.h
+===================================================================
+--- libesmtp-1.0.6.orig/missing.h
++++ libesmtp-1.0.6/missing.h
+@@ -43,7 +43,7 @@ int strncasecmp (const char *a, const ch
+ void *memrchr (const void *a, int c, size_t len);
+ #endif
+ 
+-#ifndef HAVE_SNPRINTF
++#ifndef HAVE_WORKING_SNPRINTF
+ #include <sys/types.h>
+ int snprintf(char *s, size_t n, const char *format, ...);
+ #endif
meta-networking/recipes-support/libesmtp/libesmtp_1.0.6.bb +3 -1
index 7ddf591eb..71c5d940b 100644
@@ -9,7 +9,9 @@ SECTION = "libs"
 DEPENDS = "openssl"
 
 SRC_URI = "http://www.stafford.uklinux.net/libesmtp/libesmtp-${PV}.tar.bz2 \
-           file://include-topdir.patch"
+           file://include-topdir.patch \
+           file://snprintf.patch \
+          "
 SRC_URI[md5sum] = "bf3915e627fd8f35524a8fdfeed979c8"
 SRC_URI[sha256sum] = "d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b"
 
Signature · 1 line
2.13.3
author
#3 lore raw

PATCH 4/7 usermode: Link with libm for powl() API

In reply to Khem Raj
---
 ...1-Makefile.am-Link-with-libm-for-powl-API.patch | 26 ++++++++++++++++++++++
 .../recipes-support/usermode/usermode_1.111.bb     |  6 ++---
 2 files changed, 29 insertions(+), 3 deletions(-)
 create mode 100644 meta-gnome/recipes-support/usermode/usermode/0001-Makefile.am-Link-with-libm-for-powl-API.patch
meta-gnome/recipes-support/usermode/usermode/0001-Makefile.am-Link-with-libm-for-powl-API.patch new file +26 -0
new file mode 100644
index 000000000..76640b0a1
@@ -0,0 +1,26 @@
+From fda0ff49968aebc7b27f9711cf6eb7f6c560adc1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 25 Jul 2017 18:28:15 -0700
+Subject: [PATCH] Makefile.am: Link with libm for powl() API
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4219f28..2a5ceac 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -69,7 +69,7 @@ dist_pkgdata_DATA = usermode.ui
+ userhelper_SOURCES = userhelper.c userhelper.h shvar.c shvar.h
+ userhelper_CPPFLAGS = $(AM_CPPFLAGS) -DSYSCONFDIR='"$(sysconfdir)"'
+ userhelper_LDADD = liblib.a $(LIBUSER_LIBS) $(GLIB_LIBS) $(PAM_LIBS) \
+-	$(SELINUX_LIBS) $(EFENCE_LIBS)
++	$(SELINUX_LIBS) $(EFENCE_LIBS) -lm
+ 
+ userinfo_SOURCES = userinfo.c
+ userinfo_CPPFLAGS = $(AM_CPPFLAGS) $(PIXMAPDIR_CPPFLAGS) $(SBINDIR_CPPFLAGS) \
+-- 
+2.13.3
+
meta-gnome/recipes-support/usermode/usermode_1.111.bb +3 -3
index 06e400e52..c2d73289e 100644
@@ -15,12 +15,12 @@ DEPENDS = "libuser ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '',
 
 SRC_URI = "https://releases.pagure.org/${BPN}/${BPN}-${PV}.tar.xz \
            file://0001-formatting-issues.patch \
-"
+           file://0001-fix-compile-failure-against-musl-C-library.patch \
+           file://0001-Makefile.am-Link-with-libm-for-powl-API.patch \
+           "
 SRC_URI[md5sum] = "28ba510fbd8da9f4e86e57d6c31cff29"
 SRC_URI[sha256sum] = "3dd0b9639b5bd396b7ea5fada6aaa694dbfdaa3ad06eb95a6eabcdfd02f875c6"
 
-SRC_URI_append_libc-musl = " file://0001-fix-compile-failure-against-musl-C-library.patch"
-
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
 inherit autotools gettext pkgconfig
Signature · 1 line
2.13.3
author
#4 lore raw

PATCH 5/7 dbus-daemon-proxy: Fix return value from master_filter_cb()

In reply to Khem Raj

Use github for SRC_URI
Reorder the linker flags so that we can remove disabling --as-needed

---
 ...-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch | 30 ++++++++++++++++++++++
 meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb |  8 +++---
 2 files changed, 34 insertions(+), 4 deletions(-)
 create mode 100644 meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch
meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch new file +30 -0
new file mode 100644
index 000000000..2c4ca057f
@@ -0,0 +1,30 @@
+From 8e6d1f590b1cb437dc67c51298ef1722a7266d35 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 25 Jul 2017 18:37:58 -0700
+Subject: [PATCH] dbus-daemon-proxy: Return DBUS_HANDLER_RESULT_NOT_YET_HANDLED
+ from master_filter_cb() if DBusConnection is null
+
+So it can be passed on to other handlers since this could
+not be handled here
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ dbus-daemon-proxy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dbus-daemon-proxy.c b/dbus-daemon-proxy.c
+index 009e4fd..f3f0d80 100644
+--- a/dbus-daemon-proxy.c
++++ b/dbus-daemon-proxy.c
+@@ -115,7 +115,7 @@ master_filter_cb (DBusConnection *conn,
+   guint32 serial;
+ 
+   if (!dbus_conn)
+-    return;
++    DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ 
+   if (verbose)
+     g_print ("New message from server: type='%d' path='%s' iface='%s'"
+-- 
+2.13.3
+
meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb +4 -4
index 4571b447f..42cd032c2 100644
@@ -6,15 +6,15 @@ SRCREV = "1226a0a1374628ff191f6d8a56000be5e53e7608"
 PV = "0.0.0+gitr${SRCPV}"
 PR = "r1.59"
 
-ASNEEDED_pn-dbus-daemon-proxy = ""
-
-SRC_URI = "git://git.collabora.co.uk/git/user/alban/dbus-daemon-proxy"
+SRC_URI = "git://github.com/alban/dbus-daemon-proxy \
+           file://0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch \
+           "
 S = "${WORKDIR}/git"
 
 inherit pkgconfig
 
 do_compile() {
-    ${CC} ${LDFLAGS} `pkg-config --cflags --libs dbus-glib-1` -o dbus-daemon-proxy dbus-daemon-proxy.c
+    ${CC} ${CFLAGS} -o dbus-daemon-proxy dbus-daemon-proxy.c `pkg-config --cflags --libs dbus-glib-1` ${LDFLAGS}
 }
 
 do_install() {
Signature · 1 line
2.13.3
author
#5 lore raw

PATCH 6/7 ssiapi: Fix build errors found with clang

In reply to Khem Raj
---
 ...itor-ordered-comparison-between-pointers-.patch | 39 ++++++++++++++++++++++
 meta-oe/recipes-support/ssiapi/ssiapi_1.0.1.bb     |  3 +-
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/ssiapi/ssiapi/0001-ssieventmonitor-ordered-comparison-between-pointers-.patch
meta-oe/recipes-support/ssiapi/ssiapi/0001-ssieventmonitor-ordered-comparison-between-pointers-.patch new file +39 -0
new file mode 100644
index 000000000..27df9b5de
@@ -0,0 +1,39 @@
+From ea9ecf4bf305f9509d5822b3823658a40162f43c Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 25 Jul 2017 19:08:21 -0700
+Subject: [PATCH] ssieventmonitor: ordered comparison between pointers and
+ zero, actually with NULL
+
+Comparing which is large or small between a pointer and NULL
+however, looks completely illogical. Ordered comparison of
+two valid pointers is legit, but no pointer will be smaller
+than NULL , so comparing if a pointer is larger than NULL
+simply means if the pointer is not NULL.
+
+Fixes errors found with clang e.g.
+
+| ssieventmonitor.cpp:339:53: error: ordered comparison between pointer and zero ('char *' and 'int')
+|                 if (fgets(nextline, sizeof(nextline) - 1, mdstat) < 0) {
+|                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tools/ssieventmonitor.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/ssieventmonitor.cpp b/tools/ssieventmonitor.cpp
+index f04b8f0..7a00122 100644
+--- a/tools/ssieventmonitor.cpp
++++ b/tools/ssieventmonitor.cpp
+@@ -336,7 +336,7 @@ static int _read_mdstat(int fd)
+ 	if (!strncmp(line, "md", 2)) {
+ 	    if (strstr(line, INACTIVE_STR)) { /* possibly container */
+ 		char nextline[1024];
+-		if (fgets(nextline, sizeof(nextline) - 1, mdstat) < 0) {
++		if (fgets(nextline, sizeof(nextline) - 1, mdstat) != (char *) NULL) {
+ 		    fclose(mdstat);
+ 		    return 1;
+ 		}
+-- 
+2.13.3
+
meta-oe/recipes-support/ssiapi/ssiapi_1.0.1.bb +2 -1
index 339637087..5eb4696b5 100644
@@ -18,7 +18,8 @@ SRC_URI = "http://sourceforge.net/projects/irstessi/files/${BPN}.${PV}.tgz \
            file://0005-engine-Define-SENTINEL.patch \
            file://0006-tools-Add-missing-includes-and-use-realpath-instead-.patch \
            file://configure-cflags.patch \
-"
+           file://0001-ssieventmonitor-ordered-comparison-between-pointers-.patch \
+           "
 SRC_URI[md5sum] = "02f16d7cbd30d28034093212906591f5"
 SRC_URI[sha256sum] = "e10d283b0f211afb8ebd0bde87c097769613d30a052cdf164753e35e803264c7"
 
Signature · 1 line
2.13.3
author
#6 lore raw

PATCH 7/7 flashrom: Fix build with clang

In reply to Khem Raj

Backport a patch from staging

---
 .../flashrom/0001-Remove-undefined-behavior.patch  | 82 ++++++++++++++++++++++
 .../recipes-extended/flashrom/flashrom_0.9.9.bb    |  3 +-
 2 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/flashrom/flashrom/0001-Remove-undefined-behavior.patch
meta-oe/recipes-extended/flashrom/flashrom/0001-Remove-undefined-behavior.patch new file +82 -0
new file mode 100644
index 000000000..51397dc55
@@ -0,0 +1,82 @@
+From d2a03b3e43043b596a79803bcb93f70e513bbb50 Mon Sep 17 00:00:00 2001
+From: Patrick Georgi <[email protected]>
+Date: Mon, 13 Mar 2017 13:48:03 +0100
+Subject: [PATCH] Remove undefined behavior
+
+Per clang-3.9, the compiler fails on #define ...defined(...) statements
+as they're undefined behavior (apparently with different behavior
+between gcc/clang and msvc, too).
+
+See clang's cfe repo commit r258128 for details.
+
+Change-Id: I82b6235e11b425fae45eebbe06b08f81c5bdbb98
+Signed-off-by: Patrick Georgi <[email protected]>
+Reviewed-on: https://review.coreboot.org/18792
+Reviewed-by: Stefan Reinauer <[email protected]>
+Tested-by: build bot (Jenkins) <[email protected]>
+---
+ hwaccess.c | 18 +++++++++++++++---
+ platform.h | 18 +++++++++++++++---
+ 2 files changed, 30 insertions(+), 6 deletions(-)
+
+diff --git a/hwaccess.c b/hwaccess.c
+index aede7e3..2bf6f42 100644
+--- a/hwaccess.c
++++ b/hwaccess.c
+@@ -37,9 +37,21 @@
+ #error "Unknown operating system"
+ #endif
+ 
+-#define USE_IOPL	(IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__))
+-#define USE_DEV_IO	(defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__))
+-#define USE_IOPERM	(defined(__gnu_hurd__))
++#if IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__)
++#define USE_IOPL 1
++#else
++#define USE_IOPL 0
++#endif
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++#define USE_DEV_IO 1
++#else
++#define USE_DEV_IO 0
++#endif
++#if defined(__gnu_hurd__)
++#define USE_IOPERM 1
++#else
++#define USE_IOPERM 0
++#endif
+ 
+ #if USE_IOPERM
+ #include <sys/io.h>
+diff --git a/platform.h b/platform.h
+index c5a52ef..b2fdcd0 100644
+--- a/platform.h
++++ b/platform.h
+@@ -25,9 +25,21 @@
+ #define __PLATFORM_H__ 1
+ 
+ // Helper defines for operating systems
+-#define IS_LINUX	(defined(__gnu_linux__) || defined(__linux__))
+-#define IS_MACOSX	(defined(__APPLE__) && defined(__MACH__)) /* yes, both. */
+-#define IS_WINDOWS	(defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__WINDOWS__))
++#if defined(__gnu_linux__) || defined(__linux__)
++#define IS_LINUX 1
++#else
++#define IS_LINUX 0
++#endif
++#if defined(__APPLE__) && defined(__MACH__) /* yes, both. */
++#define IS_MACOSX 1
++#else
++#define IS_MACOSX 0
++#endif
++#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__WINDOWS__)
++#define IS_WINDOWS 1
++#else
++#define IS_WINDOWS 0
++#endif
+ 
+ // Likewise for target architectures
+ #if defined (__i386__) || defined (__x86_64__) || defined(__amd64__)
+-- 
+2.13.3
+
meta-oe/recipes-extended/flashrom/flashrom_0.9.9.bb +2 -1
index 1bd97929c..4cdd8ad23 100644
@@ -3,11 +3,12 @@ LICENSE = "GPLv2"
 HOMEPAGE = "http://flashrom.org"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "pciutils libusb"
+DEPENDS = "pciutils libusb libusb-compat"
 
 SRC_URI = "http://download.flashrom.org/releases/flashrom-${PV}.tar.bz2 \
            file://0001-spi-Define-_XOPEN_SOURCE-to-enable-ffs-libc-API.patch \
            file://sst26.patch \
+           file://0001-Remove-undefined-behavior.patch \
            "
 SRC_URI[md5sum] = "aab9c98925d9cfb5ffb28b67a6112530"
 SRC_URI[sha256sum] = "cb3156b0f63eb192024b76c0814135930297aac41f80761a5d293de769783c45"
Signature · 1 line
2.13.3