+++ /dev/null
-From 2e1a982ed0eef1188ad15995e177e7d40746685f Mon Sep 17 00:00:00 2001
-From: Corey Minyard <cminyard@mvista.com>
-Date: Tue, 7 Jan 2020 11:34:33 -0600
-Subject: [PATCH] Fix an issue compiling with pthreads disabled
-
-Define PTHREAD_MUTEX_INITIALIZER in this case.
-
-Signed-off-by: Corey Minyard <cminyard@mvista.com>
-[Retrieved from:
-https://github.com/cminyard/gensio/commit/2e1a982ed0eef1188ad15995e177e7d40746685f]
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- lib/gensio_selector.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/gensio_selector.c b/lib/gensio_selector.c
-index c050df0..66ada01 100644
---- a/lib/gensio_selector.c
-+++ b/lib/gensio_selector.c
-@@ -30,6 +30,7 @@
- #define pthread_mutex_unlock(l) do { } while (0)
- #define pthread_mutex_init(l, n) do { } while (0)
- #define pthread_mutex_destroy(l, n) do { } while (0)
-+#define PTHREAD_MUTEX_INITIALIZER 0
- #endif
-
- #include <gensio/gensio_selector.h>
+++ /dev/null
-From f1582f417aaf8f4fa7f1828f2504ba2f03909819 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Sat, 25 Jan 2020 23:35:54 +0100
-Subject: [PATCH] lib/gensio_selector.c: fix definition of
- pthread_mutex_destroy
-
-Fix definition of pthread_mutex_destroy otherwise build without threads
-will fail on:
-
-gensio_selector.c: In function 'gensio_sel_free_lock':
-gensio_selector.c:82:38: error: macro "pthread_mutex_destroy" requires 2 arguments, but only 1 given
- pthread_mutex_destroy(&lock->lock);
- ^
-gensio_selector.c:82:5: error: 'pthread_mutex_destroy' undeclared (first use in this function)
- pthread_mutex_destroy(&lock->lock);
- ^~~~~~~~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/b5847ac9e818571b746e2a81cf830b6caf50a7d7
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/cminyard/gensio/pull/8]
----
- lib/gensio_selector.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gensio_selector.c b/lib/gensio_selector.c
-index a3bec38..615ab61 100644
---- a/lib/gensio_selector.c
-+++ b/lib/gensio_selector.c
-@@ -29,7 +29,7 @@
- #define pthread_mutex_lock(l) do { } while (0)
- #define pthread_mutex_unlock(l) do { } while (0)
- #define pthread_mutex_init(l, n) do { } while (0)
--#define pthread_mutex_destroy(l, n) do { } while (0)
-+#define pthread_mutex_destroy(l) do { } while (0)
- #define PTHREAD_MUTEX_INITIALIZER 0
- #endif
-
---
-2.24.1
-
+++ /dev/null
-From 5009fc3c273622c35a31ba5d600124117b484fd9 Mon Sep 17 00:00:00 2001
-From: Corey Minyard <cminyard@mvista.com>
-Date: Sun, 26 Jan 2020 21:26:07 -0600
-Subject: [PATCH] configure: Modify --with-openssl to take yes and no
-
-Allow openssl to be disabled with --with-openssl=no. Otherwise works as
-before.
-
-Signed-off-by: Corey Minyard <cminyard@mvista.com>
-[Retrieved from:
-https://github.com/cminyard/gensio/commit/5009fc3c273622c35a31ba5d600124117b484fd9]
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- m4/ax_check_openssl.m4 | 117 ++++++++++++++++++++++-------------------
- 1 file changed, 63 insertions(+), 54 deletions(-)
-
-diff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4
-index a87c5a6..489fd88 100644
---- a/m4/ax_check_openssl.m4
-+++ b/m4/ax_check_openssl.m4
-@@ -37,18 +37,25 @@
- AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
- AC_DEFUN([AX_CHECK_OPENSSL], [
- found=false
-+ tryopenssl=true
-+ ssldirs=""
- AC_ARG_WITH([openssl],
-- [AS_HELP_STRING([--with-openssl=DIR],
-- [root of the OpenSSL directory])],
-+ [AS_HELP_STRING([--with-openssl[[=yes|no|PATH]]],
-+ [Look for OpenSSL, with optional root of the OpenSSL directory])],
- [
- case "$withval" in
-- "" | y | ye | yes | n | no)
-- AC_MSG_ERROR([Invalid --with-openssl value])
-+ "" | y | ye | yes)
-+ ;;
-+ n | no)
-+ tryopenssl=false
- ;;
- *) ssldirs="$withval"
- ;;
- esac
-- ], [
-+ ], [])
-+
-+ if $tryopenssl; then
-+ if test x"$ssldirs" == x""; then
- # if pkg-config is installed and openssl has installed a .pc file,
- # then use that information and don't search ssldirs
- AC_PATH_PROG([PKG_CONFIG], [pkg-config])
-@@ -65,60 +72,62 @@ AC_DEFUN([AX_CHECK_OPENSSL], [
- if ! $found; then
- ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
- fi
-- ]
-- )
-+ fi
-
-+ # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
-+ # an 'openssl' subdirectory
-
-- # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
-- # an 'openssl' subdirectory
--
-- if ! $found; then
-- OPENSSL_INCLUDES=
-- for ssldir in $ssldirs; do
-- AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
-- if test -f "$ssldir/include/openssl/ssl.h"; then
-- OPENSSL_INCLUDES="-I$ssldir/include"
-- OPENSSL_LDFLAGS="-L$ssldir/lib"
-- OPENSSL_LIBS="-lssl -lcrypto"
-- found=true
-- AC_MSG_RESULT([yes])
-- break
-- else
-- AC_MSG_RESULT([no])
-- fi
-- done
-+ if ! $found; then
-+ OPENSSL_INCLUDES=
-+ for ssldir in $ssldirs; do
-+ AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
-+ if test -f "$ssldir/include/openssl/ssl.h"; then
-+ OPENSSL_INCLUDES="-I$ssldir/include"
-+ OPENSSL_LDFLAGS="-L$ssldir/lib"
-+ OPENSSL_LIBS="-lssl -lcrypto"
-+ found=true
-+ AC_MSG_RESULT([yes])
-+ break
-+ else
-+ AC_MSG_RESULT([no])
-+ fi
-+ done
-
-- # if the file wasn't found, well, go ahead and try the link anyway -- maybe
-- # it will just work!
-- fi
-+ # if the file wasn't found, well, go ahead and try the link anyway -- maybe
-+ # it will just work!
-+ fi
-
-- # try the preprocessor and linker with our new flags,
-- # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
-+ # try the preprocessor and linker with our new flags,
-+ # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
-
-- AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
-- echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
-- "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
-+ AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
-+ echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
-+ "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
-
-- save_LIBS="$LIBS"
-- save_LDFLAGS="$LDFLAGS"
-- save_CPPFLAGS="$CPPFLAGS"
-- LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
-- LIBS="$OPENSSL_LIBS $LIBS"
-- CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
-- AC_LINK_IFELSE(
-- [AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
-- [
-- AC_MSG_RESULT([yes])
-- $1
-- ], [
-- AC_MSG_RESULT([no])
-- $2
-- ])
-- CPPFLAGS="$save_CPPFLAGS"
-- LDFLAGS="$save_LDFLAGS"
-- LIBS="$save_LIBS"
-+ save_LIBS="$LIBS"
-+ save_LDFLAGS="$LDFLAGS"
-+ save_CPPFLAGS="$CPPFLAGS"
-+ LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
-+ LIBS="$OPENSSL_LIBS $LIBS"
-+ CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
-+ AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
-+ [
-+ AC_MSG_RESULT([yes])
-+ $1
-+ ], [
-+ AC_MSG_RESULT([no])
-+ $2
-+ ])
-+ CPPFLAGS="$save_CPPFLAGS"
-+ LDFLAGS="$save_LDFLAGS"
-+ LIBS="$save_LIBS"
-
-- AC_SUBST([OPENSSL_INCLUDES])
-- AC_SUBST([OPENSSL_LIBS])
-- AC_SUBST([OPENSSL_LDFLAGS])
-+ AC_SUBST([OPENSSL_INCLUDES])
-+ AC_SUBST([OPENSSL_LIBS])
-+ AC_SUBST([OPENSSL_LDFLAGS])
-+ else
-+ AC_MSG_NOTICE([Skipping openssl check, openssl disabled])
-+ $2
-+ fi
- ])