ia64/xen-unstable

changeset 19772:aaab04808ee7

Introduce mechanism to check standard conformance of headers

While pretty simplistic, it appears to serve the purpose at the moment
(i.e. it spotted two places where a GNU extension was used withou
proper preprocessor conditionals). The "simplistic" here includes that
the checking gets only done for native builds, and ia64 gets excluded
due to its arch-specific header intentionally (for whatever reason)
checking that anonymous struct/unions can be used.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 17 07:21:03 2009 +0100 (2009-06-17)
parents 0ea75c3b7743
children 11d8ca329b54
files extras/mini-os/fs-front.c tools/fs-back/fs-ops.c xen/arch/ia64/xen/platform_hypercall.c xen/arch/x86/platform_hypercall.c xen/include/Makefile xen/include/headers.chk xen/include/public/event_channel.h xen/include/public/grant_table.h xen/include/public/hvm/hvm_op.h xen/include/public/io/fsif.h xen/include/public/io/xs_wire.h xen/include/public/memory.h xen/include/public/nmi.h xen/include/public/physdev.h xen/include/public/platform.h xen/include/public/vcpu.h
line diff
     1.1 --- a/extras/mini-os/fs-front.c	Wed Jun 17 07:14:02 2009 +0100
     1.2 +++ b/extras/mini-os/fs-front.c	Wed Jun 17 07:21:03 2009 +0100
     1.3 @@ -218,7 +218,7 @@ int fs_open(struct fs_import *import, ch
     1.4      schedule();
     1.5      
     1.6      /* Read the response */
     1.7 -    fd = (int)fsr->shadow_rsp.ret_val;
     1.8 +    fd = (int)fsr->shadow_rsp.u.ret_val;
     1.9      DEBUG("The following FD returned: %d\n", fd);
    1.10      free_buffer_page(fsr);
    1.11      add_id_to_freelist(priv_req_id, import->freelist);
    1.12 @@ -256,7 +256,7 @@ int fs_close(struct fs_import *import, i
    1.13      schedule();
    1.14      
    1.15      /* Read the response */
    1.16 -    ret = (int)fsr->shadow_rsp.ret_val;
    1.17 +    ret = (int)fsr->shadow_rsp.u.ret_val;
    1.18      DEBUG("Close returned: %d\n", ret);
    1.19      add_id_to_freelist(priv_req_id, import->freelist);
    1.20  
    1.21 @@ -313,7 +313,7 @@ ssize_t fs_read(struct fs_import *import
    1.22      schedule();
    1.23      
    1.24      /* Read the response */
    1.25 -    ret = (ssize_t)fsr->shadow_rsp.ret_val;
    1.26 +    ret = (ssize_t)fsr->shadow_rsp.u.ret_val;
    1.27      DEBUG("The following ret value returned %d\n", ret);
    1.28      if(ret > 0)
    1.29      {
    1.30 @@ -391,7 +391,7 @@ ssize_t fs_write(struct fs_import *impor
    1.31      schedule();
    1.32      
    1.33      /* Read the response */
    1.34 -    ret = (ssize_t)fsr->shadow_rsp.ret_val;
    1.35 +    ret = (ssize_t)fsr->shadow_rsp.u.ret_val;
    1.36      DEBUG("The following ret value returned %d\n", ret);
    1.37      for(i=0; i<gnts.count; i++)
    1.38      {
    1.39 @@ -435,10 +435,10 @@ int fs_stat(struct fs_import *import,
    1.40      schedule();
    1.41      
    1.42      /* Read the response */
    1.43 -    ret = (int)fsr->shadow_rsp.ret_val;
    1.44 +    ret = (int)fsr->shadow_rsp.u.ret_val;
    1.45      DEBUG("Following ret from fstat: %d\n", ret);
    1.46      memcpy(stat, 
    1.47 -           &fsr->shadow_rsp.fstat, 
    1.48 +           &fsr->shadow_rsp.u.fstat, 
    1.49             sizeof(struct fsif_stat_response));
    1.50      add_id_to_freelist(priv_req_id, import->freelist);
    1.51  
    1.52 @@ -478,7 +478,7 @@ int fs_truncate(struct fs_import *import
    1.53      schedule();
    1.54      
    1.55      /* Read the response */
    1.56 -    ret = (int)fsr->shadow_rsp.ret_val;
    1.57 +    ret = (int)fsr->shadow_rsp.u.ret_val;
    1.58      DEBUG("Following ret from ftruncate: %d\n", ret);
    1.59      add_id_to_freelist(priv_req_id, import->freelist);
    1.60  
    1.61 @@ -520,7 +520,7 @@ int fs_remove(struct fs_import *import, 
    1.62      schedule();
    1.63      
    1.64      /* Read the response */
    1.65 -    ret = (int)fsr->shadow_rsp.ret_val;
    1.66 +    ret = (int)fsr->shadow_rsp.u.ret_val;
    1.67      DEBUG("The following ret: %d\n", ret);
    1.68      free_buffer_page(fsr);
    1.69      add_id_to_freelist(priv_req_id, import->freelist);
    1.70 @@ -575,7 +575,7 @@ int fs_rename(struct fs_import *import,
    1.71      schedule();
    1.72      
    1.73      /* Read the response */
    1.74 -    ret = (int)fsr->shadow_rsp.ret_val;
    1.75 +    ret = (int)fsr->shadow_rsp.u.ret_val;
    1.76      DEBUG("The following ret: %d\n", ret);
    1.77      free_buffer_page(fsr);
    1.78      add_id_to_freelist(priv_req_id, import->freelist);
    1.79 @@ -621,7 +621,7 @@ int fs_create(struct fs_import *import, 
    1.80      schedule();
    1.81      
    1.82      /* Read the response */
    1.83 -    ret = (int)fsr->shadow_rsp.ret_val;
    1.84 +    ret = (int)fsr->shadow_rsp.u.ret_val;
    1.85      DEBUG("The following ret: %d\n", ret);
    1.86      free_buffer_page(fsr);
    1.87      add_id_to_freelist(priv_req_id, import->freelist);
    1.88 @@ -670,7 +670,7 @@ char** fs_list(struct fs_import *import,
    1.89      schedule();
    1.90      
    1.91      /* Read the response */
    1.92 -    *nr_files = (fsr->shadow_rsp.ret_val & NR_FILES_MASK) >> NR_FILES_SHIFT;
    1.93 +    *nr_files = (fsr->shadow_rsp.u.ret_val & NR_FILES_MASK) >> NR_FILES_SHIFT;
    1.94      files = NULL;
    1.95      if(*nr_files <= 0) goto exit;
    1.96      files = malloc(sizeof(char*) * (*nr_files));
    1.97 @@ -681,7 +681,7 @@ char** fs_list(struct fs_import *import,
    1.98          current_file += strlen(current_file) + 1;
    1.99      }
   1.100      if(has_more != NULL)
   1.101 -        *has_more = fsr->shadow_rsp.ret_val & HAS_MORE_FLAG;
   1.102 +        *has_more = fsr->shadow_rsp.u.ret_val & HAS_MORE_FLAG;
   1.103      free_buffer_page(fsr);
   1.104      add_id_to_freelist(priv_req_id, import->freelist);
   1.105  exit:
   1.106 @@ -719,7 +719,7 @@ int fs_chmod(struct fs_import *import, i
   1.107      schedule();
   1.108      
   1.109      /* Read the response */
   1.110 -    ret = (int)fsr->shadow_rsp.ret_val;
   1.111 +    ret = (int)fsr->shadow_rsp.u.ret_val;
   1.112      DEBUG("The following returned: %d\n", ret);
   1.113      add_id_to_freelist(priv_req_id, import->freelist);
   1.114  
   1.115 @@ -761,7 +761,7 @@ int64_t fs_space(struct fs_import *impor
   1.116      schedule();
   1.117      
   1.118      /* Read the response */
   1.119 -    ret = (int64_t)fsr->shadow_rsp.ret_val;
   1.120 +    ret = (int64_t)fsr->shadow_rsp.u.ret_val;
   1.121      DEBUG("The following returned: %lld\n", ret);
   1.122      free_buffer_page(fsr);
   1.123      add_id_to_freelist(priv_req_id, import->freelist);
   1.124 @@ -799,7 +799,7 @@ int fs_sync(struct fs_import *import, in
   1.125      schedule();
   1.126      
   1.127      /* Read the response */
   1.128 -    ret = (int)fsr->shadow_rsp.ret_val;
   1.129 +    ret = (int)fsr->shadow_rsp.u.ret_val;
   1.130      DEBUG("Close returned: %d\n", ret);
   1.131      add_id_to_freelist(priv_req_id, import->freelist);
   1.132  
   1.133 @@ -852,7 +852,7 @@ moretodo:
   1.134  
   1.135          rsp = RING_GET_RESPONSE(&import->ring, cons); 
   1.136          DEBUG("Response at idx=%d to request id=%d, ret_val=%lx\n", 
   1.137 -            cons, rsp->id, rsp->ret_val);
   1.138 +            cons, rsp->id, rsp->u.ret_val);
   1.139          req = &import->requests[rsp->id];
   1.140          memcpy(&req->shadow_rsp, rsp, sizeof(struct fsif_response));
   1.141          DEBUG("Waking up: %s\n", req->thread->name);
     2.1 --- a/tools/fs-back/fs-ops.c	Wed Jun 17 07:14:02 2009 +0100
     2.2 +++ b/tools/fs-back/fs-ops.c	Wed Jun 17 07:21:03 2009 +0100
     2.3 @@ -89,7 +89,7 @@ static void dispatch_file_open(struct fs
     2.4      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
     2.5      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
     2.6      rsp->id = req_id; 
     2.7 -    rsp->ret_val = (uint64_t)fd;
     2.8 +    rsp->u.ret_val = (uint64_t)fd;
     2.9  }
    2.10  
    2.11  static void dispatch_file_close(struct fs_mount *mount, struct fsif_request *req)
    2.12 @@ -119,7 +119,7 @@ static void dispatch_file_close(struct f
    2.13      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
    2.14      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
    2.15      rsp->id = req_id; 
    2.16 -    rsp->ret_val = (uint64_t)ret;
    2.17 +    rsp->u.ret_val = (uint64_t)ret;
    2.18  }
    2.19  
    2.20  #define MAX_GNTS 16
    2.21 @@ -190,7 +190,7 @@ static void end_file_read(struct fs_moun
    2.22      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
    2.23      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
    2.24      rsp->id = req_id; 
    2.25 -    rsp->ret_val = (uint64_t)aio_return(&priv_req->aiocb);
    2.26 +    rsp->u.ret_val = (uint64_t)aio_return(&priv_req->aiocb);
    2.27  }
    2.28  
    2.29  static void dispatch_file_write(struct fs_mount *mount, struct fsif_request *req)
    2.30 @@ -261,7 +261,7 @@ static void end_file_write(struct fs_mou
    2.31      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
    2.32      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
    2.33      rsp->id = req_id; 
    2.34 -    rsp->ret_val = (uint64_t)aio_return(&priv_req->aiocb);
    2.35 +    rsp->u.ret_val = (uint64_t)aio_return(&priv_req->aiocb);
    2.36  }
    2.37  
    2.38  static void dispatch_stat(struct fs_mount *mount, struct fsif_request *req)
    2.39 @@ -294,24 +294,24 @@ static void dispatch_stat(struct fs_moun
    2.40      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
    2.41      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
    2.42      rsp->id = req_id; 
    2.43 -    rsp->fstat.stat_ret = (uint32_t)ret;
    2.44 -    rsp->fstat.stat_mode  = stat.st_mode;
    2.45 -    rsp->fstat.stat_uid   = stat.st_uid;
    2.46 -    rsp->fstat.stat_gid   = stat.st_gid;
    2.47 +    rsp->u.fstat.stat_ret = (uint32_t)ret;
    2.48 +    rsp->u.fstat.stat_mode  = stat.st_mode;
    2.49 +    rsp->u.fstat.stat_uid   = stat.st_uid;
    2.50 +    rsp->u.fstat.stat_gid   = stat.st_gid;
    2.51  #ifdef BLKGETSIZE
    2.52      if (S_ISBLK(stat.st_mode)) {
    2.53  	unsigned long sectors;
    2.54  	if (ioctl(fd, BLKGETSIZE, &sectors)) {
    2.55  	    perror("getting device size\n");
    2.56 -	    rsp->fstat.stat_size = 0;
    2.57 +	    rsp->u.fstat.stat_size = 0;
    2.58  	} else
    2.59 -	    rsp->fstat.stat_size = sectors << 9;
    2.60 +	    rsp->u.fstat.stat_size = sectors << 9;
    2.61      } else
    2.62  #endif
    2.63 -	rsp->fstat.stat_size  = stat.st_size;
    2.64 -    rsp->fstat.stat_atime = stat.st_atime;
    2.65 -    rsp->fstat.stat_mtime = stat.st_mtime;
    2.66 -    rsp->fstat.stat_ctime = stat.st_ctime;
    2.67 +	rsp->u.fstat.stat_size  = stat.st_size;
    2.68 +    rsp->u.fstat.stat_atime = stat.st_atime;
    2.69 +    rsp->u.fstat.stat_mtime = stat.st_mtime;
    2.70 +    rsp->u.fstat.stat_ctime = stat.st_ctime;
    2.71  }
    2.72  
    2.73  
    2.74 @@ -344,7 +344,7 @@ static void dispatch_truncate(struct fs_
    2.75      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
    2.76      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
    2.77      rsp->id = req_id; 
    2.78 -    rsp->ret_val = (uint64_t)ret;
    2.79 +    rsp->u.ret_val = (uint64_t)ret;
    2.80  }
    2.81  
    2.82  static void dispatch_remove(struct fs_mount *mount, struct fsif_request *req)
    2.83 @@ -382,7 +382,7 @@ static void dispatch_remove(struct fs_mo
    2.84      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
    2.85      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
    2.86      rsp->id = req_id; 
    2.87 -    rsp->ret_val = (uint64_t)ret;
    2.88 +    rsp->u.ret_val = (uint64_t)ret;
    2.89  }
    2.90  
    2.91  
    2.92 @@ -429,7 +429,7 @@ static void dispatch_rename(struct fs_mo
    2.93      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
    2.94      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
    2.95      rsp->id = req_id; 
    2.96 -    rsp->ret_val = (uint64_t)ret;
    2.97 +    rsp->u.ret_val = (uint64_t)ret;
    2.98  }
    2.99  
   2.100  
   2.101 @@ -490,7 +490,7 @@ static void dispatch_create(struct fs_mo
   2.102      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
   2.103      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
   2.104      rsp->id = req_id; 
   2.105 -    rsp->ret_val = (uint64_t)ret;
   2.106 +    rsp->u.ret_val = (uint64_t)ret;
   2.107  }
   2.108  
   2.109  static void dispatch_list(struct fs_mount *mount, struct fsif_request *req)
   2.110 @@ -560,7 +560,7 @@ error_out:
   2.111      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
   2.112      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
   2.113      rsp->id = req_id; 
   2.114 -    rsp->ret_val = ret_val;
   2.115 +    rsp->u.ret_val = ret_val;
   2.116  }
   2.117  
   2.118  static void dispatch_chmod(struct fs_mount *mount, struct fsif_request *req)
   2.119 @@ -591,7 +591,7 @@ static void dispatch_chmod(struct fs_mou
   2.120      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
   2.121      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
   2.122      rsp->id = req_id; 
   2.123 -    rsp->ret_val = (uint64_t)ret;
   2.124 +    rsp->u.ret_val = (uint64_t)ret;
   2.125  }
   2.126  
   2.127  static void dispatch_fs_space(struct fs_mount *mount, struct fsif_request *req)
   2.128 @@ -632,7 +632,7 @@ static void dispatch_fs_space(struct fs_
   2.129      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
   2.130      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
   2.131      rsp->id = req_id; 
   2.132 -    rsp->ret_val = (uint64_t)ret;
   2.133 +    rsp->u.ret_val = (uint64_t)ret;
   2.134  }
   2.135  
   2.136  static void dispatch_file_sync(struct fs_mount *mount, struct fsif_request *req)
   2.137 @@ -681,7 +681,7 @@ static void end_file_sync(struct fs_moun
   2.138      FS_DEBUG("Writing response at: idx=%d, id=%d\n", rsp_idx, req_id);
   2.139      rsp = RING_GET_RESPONSE(&mount->ring, rsp_idx);
   2.140      rsp->id = req_id; 
   2.141 -    rsp->ret_val = (uint64_t)aio_return(&priv_req->aiocb);
   2.142 +    rsp->u.ret_val = (uint64_t)aio_return(&priv_req->aiocb);
   2.143  }
   2.144  
   2.145  struct fs_op fopen_op     = {.type             = REQ_FILE_OPEN,
     3.1 --- a/xen/arch/ia64/xen/platform_hypercall.c	Wed Jun 17 07:14:02 2009 +0100
     3.2 +++ b/xen/arch/ia64/xen/platform_hypercall.c	Wed Jun 17 07:21:03 2009 +0100
     3.3 @@ -48,7 +48,7 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
     3.4                  break;
     3.5              }
     3.6              ret = set_px_pminfo(op->u.set_pminfo.id,
     3.7 -                    &op->u.set_pminfo.perf);
     3.8 +                                &op->u.set_pminfo.u.perf);
     3.9              break;
    3.10  
    3.11          case XEN_PM_CX:
     4.1 --- a/xen/arch/x86/platform_hypercall.c	Wed Jun 17 07:14:02 2009 +0100
     4.2 +++ b/xen/arch/x86/platform_hypercall.c	Wed Jun 17 07:21:03 2009 +0100
     4.3 @@ -359,7 +359,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
     4.4                  ret = -ENOSYS;
     4.5                  break;
     4.6              }
     4.7 -            ret = set_px_pminfo(op->u.set_pminfo.id, &op->u.set_pminfo.perf);
     4.8 +            ret = set_px_pminfo(op->u.set_pminfo.id, &op->u.set_pminfo.u.perf);
     4.9              break;
    4.10   
    4.11          case XEN_PM_CX:
    4.12 @@ -368,7 +368,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
    4.13                  ret = -ENOSYS;
    4.14                  break;
    4.15              }
    4.16 -            ret = set_cx_pminfo(op->u.set_pminfo.id, &op->u.set_pminfo.power);
    4.17 +            ret = set_cx_pminfo(op->u.set_pminfo.id, &op->u.set_pminfo.u.power);
    4.18              break;
    4.19  
    4.20          case XEN_PM_TX:
     5.1 --- a/xen/include/Makefile	Wed Jun 17 07:14:02 2009 +0100
     5.2 +++ b/xen/include/Makefile	Wed Jun 17 07:21:03 2009 +0100
     5.3 @@ -1,3 +1,6 @@
     5.4 +XEN_ROOT:=$(BASEDIR)/..
     5.5 +include $(XEN_ROOT)/Config.mk
     5.6 +
     5.7  ifneq ($(CONFIG_COMPAT),)
     5.8  
     5.9  compat-arch-$(CONFIG_X86) := x86_32
    5.10 @@ -35,6 +38,9 @@ suffix-$(CONFIG_X86)      := \#pragma pa
    5.11  
    5.12  endif
    5.13  
    5.14 +public-$(CONFIG_X86) := $(wildcard public/arch-x86/*.h public/arch-x86/*/*.h)
    5.15 +public-$(CONFIG_IA64) := $(wildcard public/arch-ia64/*.h public/arch-ia64/*/*.h)
    5.16 +
    5.17  .PHONY: all
    5.18  all: $(headers-y)
    5.19  
    5.20 @@ -67,5 +73,18 @@ compat/xlat.h: xlat.lst $(filter-out com
    5.21  	done >$@.new
    5.22  	mv -f $@.new $@
    5.23  
    5.24 +ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
    5.25 +# public/arch-ia64.h explicitly bails on __STRICT_ANSI__
    5.26 +ifeq ($(CONFIG_IA64),)
    5.27 +
    5.28 +all: headers.chk
    5.29 +
    5.30 +headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) Makefile
    5.31 +	for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
    5.32 +	mv $@.new $@
    5.33 +
    5.34 +endif
    5.35 +endif
    5.36 +
    5.37  clean::
    5.38  	rm -rf compat
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/xen/include/headers.chk	Wed Jun 17 07:21:03 2009 +0100
     6.3 @@ -0,0 +1,39 @@
     6.4 +public/callback.h
     6.5 +public/dom0_ops.h
     6.6 +public/elfnote.h
     6.7 +public/event_channel.h
     6.8 +public/features.h
     6.9 +public/grant_table.h
    6.10 +public/kexec.h
    6.11 +public/memory.h
    6.12 +public/nmi.h
    6.13 +public/physdev.h
    6.14 +public/platform.h
    6.15 +public/sched.h
    6.16 +public/tmem.h
    6.17 +public/trace.h
    6.18 +public/vcpu.h
    6.19 +public/version.h
    6.20 +public/xencomm.h
    6.21 +public/xen-compat.h
    6.22 +public/xen.h
    6.23 +public/xenoprof.h
    6.24 +public/hvm/e820.h
    6.25 +public/hvm/hvm_info_table.h
    6.26 +public/hvm/hvm_op.h
    6.27 +public/hvm/ioreq.h
    6.28 +public/hvm/params.h
    6.29 +public/io/blkif.h
    6.30 +public/io/console.h
    6.31 +public/io/fbif.h
    6.32 +public/io/fsif.h
    6.33 +public/io/kbdif.h
    6.34 +public/io/netif.h
    6.35 +public/io/pciif.h
    6.36 +public/io/protocols.h
    6.37 +public/io/ring.h
    6.38 +public/io/tpmif.h
    6.39 +public/io/usbif.h
    6.40 +public/io/vscsiif.h
    6.41 +public/io/xenbus.h
    6.42 +public/io/xs_wire.h
     7.1 --- a/xen/include/public/event_channel.h	Wed Jun 17 07:14:02 2009 +0100
     7.2 +++ b/xen/include/public/event_channel.h	Wed Jun 17 07:21:03 2009 +0100
     7.3 @@ -27,6 +27,8 @@
     7.4  #ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__
     7.5  #define __XEN_PUBLIC_EVENT_CHANNEL_H__
     7.6  
     7.7 +#include "xen.h"
     7.8 +
     7.9  /*
    7.10   * Prototype for this hypercall is:
    7.11   *  int event_channel_op(int cmd, void *args)
     8.1 --- a/xen/include/public/grant_table.h	Wed Jun 17 07:14:02 2009 +0100
     8.2 +++ b/xen/include/public/grant_table.h	Wed Jun 17 07:21:03 2009 +0100
     8.3 @@ -28,6 +28,7 @@
     8.4  #ifndef __XEN_PUBLIC_GRANT_TABLE_H__
     8.5  #define __XEN_PUBLIC_GRANT_TABLE_H__
     8.6  
     8.7 +#include "xen.h"
     8.8  
     8.9  /***********************************
    8.10   * GRANT TABLE REPRESENTATION
     9.1 --- a/xen/include/public/hvm/hvm_op.h	Wed Jun 17 07:14:02 2009 +0100
     9.2 +++ b/xen/include/public/hvm/hvm_op.h	Wed Jun 17 07:21:03 2009 +0100
     9.3 @@ -21,6 +21,8 @@
     9.4  #ifndef __XEN_PUBLIC_HVM_HVM_OP_H__
     9.5  #define __XEN_PUBLIC_HVM_HVM_OP_H__
     9.6  
     9.7 +#include "../xen.h"
     9.8 +
     9.9  /* Get/set subcommands: extra argument == pointer to xen_hvm_param struct. */
    9.10  #define HVMOP_set_param           0
    9.11  #define HVMOP_get_param           1
    10.1 --- a/xen/include/public/io/fsif.h	Wed Jun 17 07:14:02 2009 +0100
    10.2 +++ b/xen/include/public/io/fsif.h	Wed Jun 17 07:21:03 2009 +0100
    10.3 @@ -169,7 +169,7 @@ struct fsif_response {
    10.4      union {
    10.5          uint64_t ret_val;
    10.6          struct fsif_stat_response fstat;
    10.7 -    };
    10.8 +    } u;
    10.9  };
   10.10  
   10.11  typedef struct fsif_response fsif_response_t;
    11.1 --- a/xen/include/public/io/xs_wire.h	Wed Jun 17 07:14:02 2009 +0100
    11.2 +++ b/xen/include/public/io/xs_wire.h	Wed Jun 17 07:21:03 2009 +0100
    11.3 @@ -60,6 +60,7 @@ struct xsd_errors
    11.4      int errnum;
    11.5      const char *errstring;
    11.6  };
    11.7 +#ifdef EINVAL
    11.8  #define XSD_ERROR(x) { x, #x }
    11.9  /* LINTED: static unused */
   11.10  static struct xsd_errors xsd_errors[]
   11.11 @@ -82,6 +83,7 @@ static struct xsd_errors xsd_errors[]
   11.12      XSD_ERROR(EAGAIN),
   11.13      XSD_ERROR(EISCONN)
   11.14  };
   11.15 +#endif
   11.16  
   11.17  struct xsd_sockmsg
   11.18  {
    12.1 --- a/xen/include/public/memory.h	Wed Jun 17 07:14:02 2009 +0100
    12.2 +++ b/xen/include/public/memory.h	Wed Jun 17 07:21:03 2009 +0100
    12.3 @@ -27,6 +27,8 @@
    12.4  #ifndef __XEN_PUBLIC_MEMORY_H__
    12.5  #define __XEN_PUBLIC_MEMORY_H__
    12.6  
    12.7 +#include "xen.h"
    12.8 +
    12.9  /*
   12.10   * Increase or decrease the specified domain's memory reservation. Returns the
   12.11   * number of extents successfully allocated or freed.
    13.1 --- a/xen/include/public/nmi.h	Wed Jun 17 07:14:02 2009 +0100
    13.2 +++ b/xen/include/public/nmi.h	Wed Jun 17 07:21:03 2009 +0100
    13.3 @@ -27,6 +27,8 @@
    13.4  #ifndef __XEN_PUBLIC_NMI_H__
    13.5  #define __XEN_PUBLIC_NMI_H__
    13.6  
    13.7 +#include "xen.h"
    13.8 +
    13.9  /*
   13.10   * NMI reason codes:
   13.11   * Currently these are x86-specific, stored in arch_shared_info.nmi_reason.
    14.1 --- a/xen/include/public/physdev.h	Wed Jun 17 07:14:02 2009 +0100
    14.2 +++ b/xen/include/public/physdev.h	Wed Jun 17 07:21:03 2009 +0100
    14.3 @@ -21,6 +21,8 @@
    14.4  #ifndef __XEN_PUBLIC_PHYSDEV_H__
    14.5  #define __XEN_PUBLIC_PHYSDEV_H__
    14.6  
    14.7 +#include "xen.h"
    14.8 +
    14.9  /*
   14.10   * Prototype for this hypercall is:
   14.11   *  int physdev_op(int cmd, void *args)
    15.1 --- a/xen/include/public/platform.h	Wed Jun 17 07:14:02 2009 +0100
    15.2 +++ b/xen/include/public/platform.h	Wed Jun 17 07:21:03 2009 +0100
    15.3 @@ -307,7 +307,7 @@ struct xenpf_set_processor_pminfo {
    15.4      union {
    15.5          struct xen_processor_power          power;/* Cx: _CST/_CSD */
    15.6          struct xen_processor_performance    perf; /* Px: _PPC/_PCT/_PSS/_PSD */
    15.7 -    };
    15.8 +    } u;
    15.9  };
   15.10  typedef struct xenpf_set_processor_pminfo xenpf_set_processor_pminfo_t;
   15.11  DEFINE_XEN_GUEST_HANDLE(xenpf_set_processor_pminfo_t);
    16.1 --- a/xen/include/public/vcpu.h	Wed Jun 17 07:14:02 2009 +0100
    16.2 +++ b/xen/include/public/vcpu.h	Wed Jun 17 07:21:03 2009 +0100
    16.3 @@ -27,6 +27,8 @@
    16.4  #ifndef __XEN_PUBLIC_VCPU_H__
    16.5  #define __XEN_PUBLIC_VCPU_H__
    16.6  
    16.7 +#include "xen.h"
    16.8 +
    16.9  /*
   16.10   * Prototype for this hypercall is:
   16.11   *  int vcpu_op(int cmd, int vcpuid, void *extra_args)