VirtualBox

Changeset 37774 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Jul 4, 2011 9:19:27 PM (14 years ago)
Author:
vboxsync
Message:

Build fixes for current FreeBSD 9 (Thanks to Bernhard Froehlich and Jung-uk Kim)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp

    r33812 r37774  
    3636
    3737#ifdef RT_OS_FREEBSD
     38# include <sys/param.h>
    3839# include <sys/types.h>
    3940# include <sys/stat.h>
     
    187188        DeviceMatchPattern.pattern.device_pattern.target_lun = CAM_LUN_WILDCARD;
    188189        DeviceMatchPattern.pattern.device_pattern.flags      = DEV_MATCH_INQUIRY;
    189         DeviceMatchPattern.pattern.device_pattern.inq_pat.type = T_CDROM;
    190         DeviceMatchPattern.pattern.device_pattern.inq_pat.media_type  = SIP_MEDIA_REMOVABLE | SIP_MEDIA_FIXED;
    191         DeviceMatchPattern.pattern.device_pattern.inq_pat.vendor[0]   = '*'; /* Matches anything */
    192         DeviceMatchPattern.pattern.device_pattern.inq_pat.product[0]  = '*'; /* Matches anything */
    193         DeviceMatchPattern.pattern.device_pattern.inq_pat.revision[0] = '*'; /* Matches anything */
     190
     191#if __FreeBSD_version >= 900000
     192# define INQ_PAT data.inq_pat
     193#else
     194 #define INQ_PAT inq_pat
     195#endif
     196        DeviceMatchPattern.pattern.device_pattern.INQ_PAT.type = T_CDROM;
     197        DeviceMatchPattern.pattern.device_pattern.INQ_PAT.media_type  = SIP_MEDIA_REMOVABLE | SIP_MEDIA_FIXED;
     198        DeviceMatchPattern.pattern.device_pattern.INQ_PAT.vendor[0]   = '*'; /* Matches anything */
     199        DeviceMatchPattern.pattern.device_pattern.INQ_PAT.product[0]  = '*'; /* Matches anything */
     200        DeviceMatchPattern.pattern.device_pattern.INQ_PAT.revision[0] = '*'; /* Matches anything */
     201#undef INQ_PAT
    194202        DeviceCCB.cdm.num_patterns    = 1;
    195203        DeviceCCB.cdm.pattern_buf_len = sizeof(struct dev_match_result);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette