reassign 629211 kfreebsd-kernel-headers
tags 629211 patch
thanks

2011/6/4 Michael Biebl <bi...@debian.org>:
> /usr/include/sys/mount.h:39:2: error: unknown type name 'u_short'
> /usr/include/sys/mount.h:40:2: error: unknown type name 'u_short'
> /usr/include/sys/mount.h:188:2: error: unknown type name 'fsid_t'
> /usr/include/sys/mount.h:201:2: error: unknown type name 'u_char'
> /usr/include/sys/mount.h:203:2: error: unknown type name 'u_char'
> /usr/include/sys/mount.h:226:2: error: unknown type name 'u_int'
> /usr/include/sys/mount.h:272:2: error: unknown type name 'fsid_t'

Seems like <sys/mount.h> buggyness.  It assumes:

- That <sys/types.h> is included.
- That _BSD_SOURCE is defined.

I propose this patch.

-- 
Robert Millan
--- /usr/include/sys/mount.h    2011-01-30 16:26:51.000000000 +0100
+++ mount.h     2011-06-04 22:37:11.000000000 +0200
@@ -26,6 +26,7 @@
 
 #include <sys/stat.h>
 #include <sys/statfs.h>
+#include <sys/types.h>
 #include <sys/ucred.h>
 #include <sys/queue.h>
 
@@ -36,8 +37,8 @@
 #define        MAXFIDSZ        16
 
 struct fid {
-       u_short         fid_len;                /* length of data in bytes */
-       u_short         fid_reserved;           /* force longword alignment */
+       __u_short       fid_len;                /* length of data in bytes */
+       __u_short       fid_reserved;           /* force longword alignment */
        char            fid_data[MAXFIDSZ];     /* data (variable length) */
 };
 
@@ -185,7 +186,7 @@
  * Generic file handle
  */
 struct fhandle {
-       fsid_t  fh_fsid;        /* Filesystem id of mount point */
+       __fsid_t        fh_fsid;        /* Filesystem id of mount point */
        struct  fid fh_fid;     /* Filesys specific id */
 };
 typedef struct fhandle fhandle_t;
@@ -198,9 +199,9 @@
        uid_t   ex_root;                /* mapping for root uid */
        struct  xucred ex_anon;         /* mapping for anonymous user */
        struct  sockaddr *ex_addr;      /* net address to which exported */
-       u_char  ex_addrlen;             /* and the net address length */
+       __u_char        ex_addrlen;     /* and the net address length */
        struct  sockaddr *ex_mask;      /* mask of valid bits in saddr */
-       u_char  ex_masklen;             /* and the smask length */
+       __u_char        ex_masklen;     /* and the smask length */
        char    *ex_indexfile;          /* index file for WebNFS URLs */
 };
 
@@ -223,7 +224,7 @@
  * XXX: Never change the first two arguments!
  */
 struct vfsconf {
-       u_int   vfc_version;            /* ABI version number */
+       __u_int vfc_version;            /* ABI version number */
        char    vfc_name[MFSNAMELEN];   /* filesystem type name */
        struct  vfsops *vfc_vfsops;     /* filesystem operations vector */
        int     vfc_typenum;            /* historic filesystem type number */
@@ -269,7 +270,7 @@
 
 struct vfsidctl {
        int             vc_vers;        /* should be VFSIDCTL_VERS1 (below) */
-       fsid_t          vc_fsid;        /* fsid to operate on. */
+       __fsid_t        vc_fsid;        /* fsid to operate on. */
        char            vc_fstypename[MFSNAMELEN];
                                        /* type of fs 'nfs' or '*' */
        fsctlop_t       vc_op;          /* operation VFS_CTL_* (below) */

Reply via email to