WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix build error with memmem()

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix build error with memmem()
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Thu, 4 Jan 2007 09:19:00 +0100
Delivery-date: Thu, 04 Jan 2007 00:22:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: AMD / OSRC
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.4
Hi!

I get this build error on *BSD with changeset 13214:

symbols.c: In function `compress_symbols':
symbols.c:366: warning: implicit declaration of function `memmem'
symbols.c:366: warning: assignment makes pointer from integer without a cast
symbols.c:385: warning: assignment makes pointer from integer without a cast
gmake[3]: *** [symbols] Error 1
gmake[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/tools'
gmake[2]: *** [default] Error 2
gmake[2]: Leaving directory `/usr/src/xen-unstable.hg/xen/tools'
gmake[1]: *** [/usr/src/xen-unstable-master.hg/xen/xen] Error 2
gmake[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'


The glibc manpage on Linux clearly says:

  CONFORMING TO
         This function is a GNU extension.

And according to the BUGS section, this function does not work reliably.

The attached patch makes this build again by replacing memmem() with strstr().

Attachment: xen-symbol.diff
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix build error with memmem(), Christoph Egger <=