On 14 May 2013 13:05, Paolo Bonzini <pbonz...@redhat.com> wrote: > This should fix building the GTK+ front-end on BSDs. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
Hi. This patch breaks the build on MacOSX: manooth$ make block/vdi.o CHK version_gen.h CC block/vdi.o block/vdi.c:124:20: error: static declaration of 'uuid_generate' follows non-static declaration static inline void uuid_generate(uuid_t out) ^ /usr/include/uuid/uuid.h:63:6: note: previous declaration is here void uuid_generate(uuid_t out); ^ block/vdi.c:129:19: error: static declaration of 'uuid_is_null' follows non-static declaration static inline int uuid_is_null(const uuid_t uu) ^ /usr/include/uuid/uuid.h:67:5: note: previous declaration is here int uuid_is_null(const uuid_t uu); ^ block/vdi.c:135:20: error: static declaration of 'uuid_unparse' follows non-static declaration static inline void uuid_unparse(const uuid_t uu, char *out) ^ /usr/include/uuid/uuid.h:71:6: note: previous declaration is here void uuid_unparse(const uuid_t uu, uuid_string_t out); ^ 3 errors generated. make: *** [block/vdi.o] Error 1 > --- a/include/qemu-common.h > +++ b/include/qemu-common.h > @@ -42,6 +42,18 @@ > #include <signal.h> > #include "glib-compat.h" > > +#if defined(__GLIBC__) > +# include <pty.h> > +#elif defined CONFIG_BSD > +# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || > defined(__DragonFly__) > +# include <libutil.h> > +# else > +# include <util.h> > +# endif > +#elif defined CONFIG_SOLARIS > +# include <stropts.h> > +#endif On MacOSX, util.h includes pwd.h which includes uuid/uuid.h (all system headers). The system uuid.h defines then conflict with QEMU's. (configure's test for libuuid has failed, so CONFIG_UUID isn't defined. This is because on MacOS you don't need '-luuid' and including it on the command line makes the compile-test fail because of a nonexistent library.) thanks -- PMM