Skip to contentSkip to conversation

Fix ioemu compile

PATCH In review [email protected] 5 participants 8 messages Dec 6, 2007 – Dec 7, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix ioemu compile

# HG changeset patch
# User [email protected]
# Date 1196969481 28800
# Node ID 2c28ac4db1f7542220b1472821e8631b79b6a23a # Parent 4a98d4b6e4daccd610175e3c0f8cab49b056c649 Fix ioemu compile

serial.c was including another Linux-specific header.

tools/ioemu/hw/serial.c +7 -1
@@ -26,9 +26,15 @@
 #include <sys/time.h>
 #include <time.h>
 #include <assert.h>
-#include <asm/termios.h>
 
 //#define DEBUG_SERIAL
+
+#define TIOCM_DTR	0x002
+#define TIOCM_RTS	0x004
+#define TIOCM_CTS	0x020
+#define TIOCM_CAR	0x040
+#define TIOCM_RI	0x080
+#define TIOCM_DSR	0x100
 
 #define UART_LCR_DLAB	0x80	/* Divisor latch access bit */
#1 lore raw

tools/ioemu/hw/serial.c line 29

Quoted 12 lines · On Thu, Dec 06, 2007 at 11:31:35AM -0800, [email protected] wrote:

serial.c was including another Linux-specific header.

tools/ioemu/hw/serial.c +0 -1
@@ -26,9 +26,15 @@
 #include <sys/time.h>
 #include <time.h>
 #include <assert.h>
-#include <asm/termios.h>

Erm, or it looks like just making this be <sys/termios.h> will work too

regards
john

#2 lore raw
Quoted 6 lines · John Levon
Quoted 4 lines · On Thu, Dec 06, 2007 at 11:31:35AM -0800, [email protected] wrote:

serial.c was including another Linux-specific header.

Quoted 10 lines

tools/ioemu/hw/serial.c line 29

Quoted 8 lines
tools/ioemu/hw/serial.c +0 -1
@@ -26,9 +26,15 @@
 #include <sys/time.h>
 #include <time.h>
 #include <assert.h>
-#include <asm/termios.h>

Erm, or it looks like just making this be <sys/termios.h> will work too

Definitely. Including asm/ headers directly on Linux is frowned upon.

Dan.

Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
#3 lore raw

Unfortunately, sys/termios.h doesn't work on linux, at least on RHEL/Fedora. I knew it wasn't quite kosher to include asm/termios.h when I did it, but it was the only way I could get the termbit defines included. I was going to look for a clean solution, but forgot. It would seem bits/termios.h needs to be extended with the necessary stuff from asm/termios.h, but I'm not sure where/who to suggest that change.

Quoted 29 lines · Daniel P. Berrange
Quoted 6 lines · John Levon
Quoted 4 lines · On Thu, Dec 06, 2007 at 11:31:35AM -0800, [email protected] wrote:

serial.c was including another Linux-specific header.

Quoted 10 lines

tools/ioemu/hw/serial.c line 29

Quoted 8 lines
tools/ioemu/hw/serial.c +0 -1
@@ -26,9 +26,15 @@
 #include <sys/time.h>
 #include <time.h>
 #include <assert.h>
-#include <asm/termios.h>

Erm, or it looks like just making this be <sys/termios.h> will work too

Definitely. Including asm/ headers directly on Linux is frowned upon.

Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|

|=-           Perl modules: http://search.cpan.org/~danberr/<http://search.cpan.org/%7Edanberr/>             -=|
|=-               Projects: http://freshmeat.net/~danielpb/<http://freshmeat.net/%7Edanielpb/>              -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505
 -=|
Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw

I checked in John Levon¹s original patch for now, but perhaps <sys/ioctl.h> would work?

-- Keir

Quoted 44 lines · Trolle Selander

Unfortunately, sys/termios.h doesn't work on linux, at least on RHEL/Fedora. I knew it wasn't quite kosher to include asm/termios.h when I did it, but it was the only way I could get the termbit defines included. I was going to look for a clean solution, but forgot. It would seem bits/termios.h needs to be extended with the necessary stuff from asm/termios.h, but I'm not sure where/who to suggest that change.

Quoted 29 lines · Daniel P. Berrange
Quoted 6 lines · John Levon
Quoted 6 lines · On Thu, Dec 06, 2007 at 11:31:35AM -0800, [email protected] wrote:
Quoted 5 lines
Quoted 5 lines

serial.c was including another Linux-specific header.

Quoted 10 lines
Quoted 10 lines
Quoted 8 lines

tools/ioemu/hw/serial.c line 29

Quoted 8 lines
tools/ioemu/hw/serial.c +0 -1
@@ -26,9 +26,15 @@
 #include <sys/time.h>
 #include <time.h>
 #include < assert.h>
-#include <asm/termios.h>

Erm, or it looks like just making this be <sys/termios.h> will work too

Definitely. Including asm/ headers directly on Linux is frowned upon.

Dan.
--

|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/
<http://search.cpan.org/%7Edanberr/>               -=|
|=-               Projects: http://freshmeat.net/~danielpb/
<http://freshmeat.net/%7Edanielpb/>                -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=|
Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw

So I propose:
#include <termios.h>
#include <sys/ioctl.h>

I think that will cover all cases. Is everyone happy with that?

-- Keir

Quoted 60 lines · Keir Fraser

I checked in John Levon¹s original patch for now, but perhaps <sys/ioctl.h> would work?

-- Keir

Quoted 46 lines · Trolle Selander

Unfortunately, sys/termios.h doesn't work on linux, at least on RHEL/Fedora. I knew it wasn't quite kosher to include asm/termios.h when I did it, but it was the only way I could get the termbit defines included. I was going to look for a clean solution, but forgot. It would seem bits/termios.h needs to be extended with the necessary stuff from asm/termios.h, but I'm not sure where/who to suggest that change.

Quoted 31 lines · Daniel P. Berrange
Quoted 6 lines · John Levon
Quoted 6 lines · On Thu, Dec 06, 2007 at 11:31:35AM -0800, [email protected] wrote:
Quoted 5 lines
Quoted 5 lines

serial.c was including another Linux-specific header.

Quoted 10 lines
Quoted 10 lines
Quoted 8 lines

tools/ioemu/hw/serial.c line 29

Quoted 8 lines
tools/ioemu/hw/serial.c +0 -1
@@ -26,9 +26,15 @@
 #include <sys/time.h>
 #include <time.h>
 #include < assert.h>
-#include <asm/termios.h>

Erm, or it looks like just making this be <sys/termios.h> will work too

Definitely. Including asm/ headers directly on Linux is frowned upon.

Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/
<http://search.cpan.org/%7Edanberr/> -=|
|=- Projects: http://freshmeat.net/~danielpb/
<http://freshmeat.net/%7Edanielpb/> -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505
-=|

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
Quoted 5 lines · Keir Fraser

So I propose:
#include <termios.h>
#include <sys/ioctl.h>

I think that will cover all cases. Is everyone happy with that?

Good for me

regards
john

#7 lore raw
In reply to Keir Fraser
Quoted 5 lines · Keir Fraser

So I propose:
#include <termios.h>
#include <sys/ioctl.h>

I think that will cover all cases. Is everyone happy with that?

Yes, that looks good.

Regards,
Dan.

Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=|