All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexandru DAMIAN <alexandru.damian@intel.com>
Subject: [PATCH 1/2] grep: Always use locale.h
Date: Wed, 20 Mar 2013 10:21:26 -0700	[thread overview]
Message-ID: <1363800087-29768-2-git-send-email-sgw@linux.intel.com> (raw)
In-Reply-To: <1363800087-29768-1-git-send-email-sgw@linux.intel.com>

From: Alexandru DAMIAN <alexandru.damian@intel.com>

The changes in the grep 2.5 configuration always leave out
HAVE_LOCALE_H - it has been removed from other files, but
not from everywhere.

This leads to a crash in certain configurations where the
size of int is not the size of pointer; this happens because
setlocale() is used while being undeclared.

[YOCTO #3959]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../grep/grep-2.5.1a/fix64-int-to-pointer.patch         | 17 +++++++++++++++++
 meta/recipes-extended/grep/grep_2.5.1a.bb               |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch

diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
new file mode 100644
index 0000000..3b91520
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
@@ -0,0 +1,17 @@
+Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
+Upstream-Status: Inappropriate [ old version that will not be maintained ]
+Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
+
+diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
+--- grep-2.5.1a-orig/lib/hard-locale.c	2001-03-04 07:33:12.000000000 +0200
++++ grep-2.5.1a/lib/hard-locale.c	2013-03-11 17:05:52.086444891 +0200
+@@ -38,9 +38,7 @@
+ # endif
+ #endif
+ 
+-#if HAVE_LOCALE_H
+ # include <locale.h>
+-#endif
+ 
+ #if HAVE_STRING_H
+ # include <string.h>
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
index ebcbe23..d6386ed 100644
--- a/meta/recipes-extended/grep/grep_2.5.1a.bb
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
            file://uclibc-fix.patch \
            file://grep_fix_for_automake-1.12.patch \
            file://gettext.patch \
+           file://fix64-int-to-pointer.patch \
            file://Makevars \
            "
 
-- 
1.8.0.2




  reply	other threads:[~2013-03-20 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 17:21 [PATCH 0/2] Fixes for 1.4 Milestone 5 Saul Wold
2013-03-20 17:21 ` Saul Wold [this message]
2013-03-20 17:21 ` [PATCH 2/2] alsa-tools: add patch for mips since it does not have io.h Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363800087-29768-2-git-send-email-sgw@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=alexandru.damian@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.