public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Kaz Kojima <kkojima@rr.iij4u.or.jp>
To: libc-hacker@sources.redhat.com
Subject: [PATCH] check_pf.c: Include alloca.h
Date: Fri, 06 Jul 2007 21:55:00 -0000	[thread overview]
Message-ID: <20070707.065436.35682509.kkojima@rr.iij4u.or.jp> (raw)

I've tried the build with gcc-4.2 for SH and got an error like

  xsh-libc-gcc4/libc.so.6: undefined reference to `__libc_use_alloca'

It seems that the undefined reference happens on check_pf.os.
Currently sysdeps/unix/sysv/linux/check_pf.c uses alloca without
including alloca.h.  Although this is not a problem on x86 because
alloca.h is included indirectly on that architecture, it looks
that other users of alloca function include alloca.h explicitly.
How about the attached one-liner?

Regards,
	kaz
--
2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/unix/sysv/linux/check_pf.c: Include alloca.h.

--- ORIG/libc/sysdeps/unix/sysv/linux/check_pf.c	2007-06-18 09:03:48.000000000 +0900
+++ LOCAL/libc/sysdeps/unix/sysv/linux/check_pf.c	2007-07-04 09:13:50.000000000 +0900
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include <alloca.h>
 #include <sys/socket.h>
 
 #include <asm/types.h>

             reply	other threads:[~2007-07-06 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-06 21:55 Kaz Kojima [this message]
2007-07-06 22:23 ` Ulrich Drepper
2007-07-06 22:43   ` Kaz Kojima
2007-07-06 23:54     ` Ulrich Drepper
2007-07-07  0:10     ` Kaz Kojima
2007-07-07  1:54       ` Ulrich Drepper

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=20070707.065436.35682509.kkojima@rr.iij4u.or.jp \
    --to=kkojima@rr.iij4u.or.jp \
    --cc=libc-hacker@sources.redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).