mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 20:48:49 +08:00
lguest: fix example launcher compilation for broken glibc headers.
Somehow a naked u16 slipped into the glibc headers on my Ubuntu machine (i386 2.17-0ubuntu5), breaking compile: In file included from lguest.c:46:0: /usr/include/linux/virtio_net.h:188:2: error: unknown type name ‘u16’ We use the kernel-style types anyway, just define them before the includes. Also remove the advice on adding missing headers: that no longer works. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9b9cd8024a
commit
e6dc0418bc
@ -1,5 +1,4 @@
|
||||
# This creates the demonstration utility "lguest" which runs a Linux guest.
|
||||
# Missing headers? Add "-I../../../include -I../../../arch/x86/include"
|
||||
CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE
|
||||
|
||||
all: lguest
|
||||
|
@ -42,14 +42,6 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/virtio_net.h>
|
||||
#include <linux/virtio_blk.h>
|
||||
#include <linux/virtio_console.h>
|
||||
#include <linux/virtio_rng.h>
|
||||
#include <linux/virtio_ring.h>
|
||||
#include <asm/bootparam.h>
|
||||
#include "../../include/linux/lguest_launcher.h"
|
||||
/*L:110
|
||||
* We can ignore the 43 include files we need for this program, but I do want
|
||||
* to draw attention to the use of kernel-style types.
|
||||
@ -65,6 +57,15 @@ typedef uint16_t u16;
|
||||
typedef uint8_t u8;
|
||||
/*:*/
|
||||
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/virtio_net.h>
|
||||
#include <linux/virtio_blk.h>
|
||||
#include <linux/virtio_console.h>
|
||||
#include <linux/virtio_rng.h>
|
||||
#include <linux/virtio_ring.h>
|
||||
#include <asm/bootparam.h>
|
||||
#include "../../include/linux/lguest_launcher.h"
|
||||
|
||||
#define BRIDGE_PFX "bridge:"
|
||||
#ifndef SIOCBRADDIF
|
||||
#define SIOCBRADDIF 0x89a2 /* add interface to bridge */
|
||||
|
Loading…
Reference in New Issue
Block a user