From 75ecb106dcf7d7e9b5634562a234acee123f4af6 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 14 Nov 2016 13:00:37 +0000 Subject: attr: move attr-specific patches into attr/ Signed-off-by: Ross Burton --- .../attr/attr/attr-Missing-configure.ac.patch | 63 ++++++++++++++++++++++ .../attr/attr/dont-use-decl-macros.patch | 56 +++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch create mode 100644 meta/recipes-support/attr/attr/dont-use-decl-macros.patch (limited to 'meta/recipes-support/attr/attr') diff --git a/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch b/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch new file mode 100644 index 0000000000..20fcc3cee7 --- /dev/null +++ b/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch @@ -0,0 +1,63 @@ +Subject: [PATCH] attr: Missing configure.ac + +Upstream-Status: Backport [Upstream released tarball missing this file] +Signed-off-by: Nathan Rossi +--- + configure.ac | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 48 insertions(+) + create mode 100644 configure.ac + +diff --git a/configure.ac b/configure.ac +new file mode 100644 +index 0000000..b966d0e +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,48 @@ ++# Copyright (C) 2009 Andreas Gruenbacher ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++# ++AC_INIT(include/attributes.h) ++AC_CONFIG_AUX_DIR([.]) ++AC_CONFIG_MACRO_DIR([m4]) ++AC_CONFIG_HEADER(include/config.h) ++AC_PREFIX_DEFAULT(/usr) ++ ++AC_PROG_LIBTOOL ++ ++AC_ARG_ENABLE(shared, ++[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],, ++ enable_shared=yes) ++AC_SUBST(enable_shared) ++ ++AC_ARG_ENABLE(gettext, ++[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],, ++ enable_gettext=yes) ++AC_SUBST(enable_gettext) ++ ++AC_ARG_ENABLE(lib64, ++[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],, ++ enable_lib64=no) ++AC_SUBST(enable_lib64) ++ ++AC_PACKAGE_GLOBALS(attr) ++AC_PACKAGE_UTILITIES(attr) ++AC_MANUAL_FORMAT ++AC_MULTILIB($enable_lib64) ++ ++AC_C_CONST ++AC_TYPE_MODE_T ++AC_FUNC_ALLOCA ++ ++AC_OUTPUT(include/builddefs) diff --git a/meta/recipes-support/attr/attr/dont-use-decl-macros.patch b/meta/recipes-support/attr/attr/dont-use-decl-macros.patch new file mode 100644 index 0000000000..9d4b8929e8 --- /dev/null +++ b/meta/recipes-support/attr/attr/dont-use-decl-macros.patch @@ -0,0 +1,56 @@ +Use extern "C" instead of __BEGIN_DECL/__END_DECL macros +these macros are defined in sys/cdefs.h for glibc and this header is not available on all libc + +anyway they defined like below + +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__THROW macro is also not available on musl, defined thusly + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Index: attr-2.4.47/include/xattr.h +=================================================================== +--- attr-2.4.47.orig/include/xattr.h 2014-04-02 00:01:30.252091280 -0700 ++++ attr-2.4.47/include/xattr.h 2014-04-02 00:12:57.985428099 -0700 +@@ -30,8 +30,20 @@ + #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ + #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ + +- +-__BEGIN_DECLS ++#ifndef __THROW ++# ifndef __GNUC_PREREQ ++# define __GNUC_PREREQ(maj, min) (0) ++# endif ++# if defined __cplusplus && __GNUC_PREREQ (2,8) ++# define __THROW throw () ++# else ++# define __THROW ++# endif ++#endif ++ ++#ifdef __cplusplus ++extern "C" { ++#endif + + extern int setxattr (const char *__path, const char *__name, + const void *__value, size_t __size, int __flags) __THROW; +@@ -58,6 +70,8 @@ + extern int lremovexattr (const char *__path, const char *__name) __THROW; + extern int fremovexattr (int __filedes, const char *__name) __THROW; + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __XATTR_H__ */ -- cgit 1.2.3-korg