Skip to contentSkip to conversation

ui/gtk.c: Fix *BSD build of Gtk+ UI

PATCH Michael Tokarev 2 participants 3 messages May 25, 2013 – Jun 5, 2013 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 5 lines · Brad Smith
Quoted 3 lines
Quoted 3 lines

+++ b/include/qemu-common.h
#elif defined CONFIG_BSD
+# include <termios.h>

Kinda late nit picking about it now.

It's not. And it's not nitpicking really, we're carrying a ton of unnecessary #includes which slows down compilation significantly.

The whole this piece of #include twist was to get declaration of openpty() or equivalent. You just stiffed an unrelated #include into this piece which was okay to remove completely. I already removed it from several other .c files where it went from vl.c originally, which used to have chardev code which is now in another file.

What was the original issue? Where exactly it was failing? I mean, where's the _proper_ place to fix it?

Speaking of "too late" -- it is definitely not late to fix another bug.

Thanks,

/mjt

#4 lore raw
Quoted 11 lines · Michael Tokarev
Quoted 5 lines · Brad Smith
Quoted 3 lines
Quoted 3 lines

+++ b/include/qemu-common.h
#elif defined CONFIG_BSD
+# include <termios.h>

Kinda late nit picking about it now.

It's not. And it's not nitpicking really, we're carrying a ton of unnecessary #includes which slows down compilation significantly.

I agree.

Quoted 7 lines

The whole this piece of #include twist was to get declaration of openpty() or equivalent. You just stiffed an unrelated #include into this piece which was okay to remove completely. I already removed it from several other .c files where it went from vl.c originally, which used to have chardev code which is now in another file.

It was not unrelated, it was necessary for the BSD code path which utilizes openpty().

Quoted 3 lines

What was the original issue? Where exactly it was failing? I mean, where's the _proper_ place to fix it?

It was failing in the Gtk+ UI code due to the use of openpty().

Signature · 3 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
#5 lore raw
In reply to a message not in the archive
Quoted 1 line · Brad Smith

Fix the build of the Gtk+ UI on *BSD systems.

Can you please describe what exactly was broken on *BSD systems, -- which file(s) needs this additional termios.h include?

I want to fix this properly, because now it isn't "nitpicking", as you say, anymore -- after the previous pbonzini's changes it does not build on debian sparc anymore due to some conflicting includes (which is an unrelated issue, but is triggered now because every .c file includes
a ton of #defines).

I already asked you the same question on 25.05, which is about two weeks ago by now, -- did you had no time to reply so far?

Thanks,

/mjt

Quoted 18 lines

Message-id: [email protected]

include/qemu-common.h +1 -0
index af769f5..c944bb7 100644
@@ -45,6 +45,7 @@
 #if defined(__GLIBC__)
 # include <pty.h>
 #elif defined CONFIG_BSD
+# include <termios.h>
 # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 #  include <libutil.h>
 # else