* Compiling grub2 on OpenBSD
@ 2008-02-01 20:49 walt
2008-02-01 21:41 ` Robert Millan
0 siblings, 1 reply; 3+ messages in thread
From: walt @ 2008-02-01 20:49 UTC (permalink / raw)
To: grub-devel
I got grub2 compiled on NetBSD, so now on to OpenBSD:
In file included from ../util/i386/pc/grub-mkimage.c:29:
../include/grub/misc.h:43: warning: conflicting types for built-in function `memcpy'
In file included from ../util/i386/pc/grub-mkimage.c:33:
/usr/include/string.h:60: error: conflicting types for `memcpy'
../include/grub/misc.h:43: error: previous declaration of `memcpy'
And here is the offending definition from /usr/include/string.h:
void *memcpy(void *, const void *, size_t)
__attribute__ ((__bounded__(__buffer__,1,3)))
__attribute__ ((__bounded__(__buffer__,2,3)));
This is only the first of many such weird things I expect to
show up. (OpenBSD has blazed its own trail to another planet
over the years :o)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Compiling grub2 on OpenBSD
2008-02-01 20:49 Compiling grub2 on OpenBSD walt
@ 2008-02-01 21:41 ` Robert Millan
2008-02-02 12:28 ` Yoshinori K. Okuji
0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2008-02-01 21:41 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, Feb 01, 2008 at 12:49:11PM -0800, walt wrote:
> I got grub2 compiled on NetBSD, so now on to OpenBSD:
>
> In file included from ../util/i386/pc/grub-mkimage.c:29:
> ../include/grub/misc.h:43: warning: conflicting types for built-in function
> `memcpy'
> In file included from ../util/i386/pc/grub-mkimage.c:33:
> /usr/include/string.h:60: error: conflicting types for `memcpy'
> ../include/grub/misc.h:43: error: previous declaration of `memcpy'
Sounds strange. Why do we have memcpy at all? Shouldn't it be grub_memcpy?
Redeclaring system-provided functions this way is asking for trouble...
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Compiling grub2 on OpenBSD
2008-02-01 21:41 ` Robert Millan
@ 2008-02-02 12:28 ` Yoshinori K. Okuji
0 siblings, 0 replies; 3+ messages in thread
From: Yoshinori K. Okuji @ 2008-02-02 12:28 UTC (permalink / raw)
To: The development of GRUB 2
On Friday 01 February 2008 22:41, Robert Millan wrote:
> On Fri, Feb 01, 2008 at 12:49:11PM -0800, walt wrote:
> > I got grub2 compiled on NetBSD, so now on to OpenBSD:
> >
> > In file included from ../util/i386/pc/grub-mkimage.c:29:
> > ../include/grub/misc.h:43: warning: conflicting types for built-in
> > function `memcpy'
> > In file included from ../util/i386/pc/grub-mkimage.c:33:
> > /usr/include/string.h:60: error: conflicting types for `memcpy'
> > ../include/grub/misc.h:43: error: previous declaration of `memcpy'
>
> Sounds strange. Why do we have memcpy at all? Shouldn't it be
> grub_memcpy?
IIRC, GCC implicitly generates references to memcpy, thus somebody has added
memcpy as an alias to grub_memcpy.
I don't know how to solve it cleanly. If you have an idea, I'd like to know.
Okuji
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-02 12:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 20:49 Compiling grub2 on OpenBSD walt
2008-02-01 21:41 ` Robert Millan
2008-02-02 12:28 ` Yoshinori K. Okuji
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.