VirtualBox

Changeset 70625 in vbox


Ignore:
Timestamp:
Jan 18, 2018 10:57:13 AM (7 years ago)
Author:
vboxsync
Message:

Make VBoxGuest-linux.c and vbox_mode.c build against Linux 4.15rc8, adjustments.
bugref:9100: Drivers/Linux: Linux 4.15 updates

Location:
trunk/src/VBox/Additions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c

    r70624 r70625  
    3838#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
    3939# define VBOXGUEST_WITH_INPUT_DRIVER
     40#endif
     41
     42#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
     43# define CONST_4_15 const
     44#else
     45# define CONST_4_15
    4046#endif
    4147
     
    10731079
    10741080/** log and dbg_log parameter setter. */
    1075 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1076 static int vgdrvLinuxParamLogGrpSet(const char *pszValue, const struct kernel_param *pParam)
    1077 #else
    1078 static int vgdrvLinuxParamLogGrpSet(const char *pszValue, struct kernel_param *pParam)
    1079 #endif
     1081static int vgdrvLinuxParamLogGrpSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
    10801082{
    10811083    if (g_fLoggerCreated)
     
    10921094
    10931095/** log and dbg_log parameter getter. */
    1094 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1095 static int vgdrvLinuxParamLogGrpGet(char *pszBuf, const struct kernel_param *pParam)
    1096 #else
    1097 static int vgdrvLinuxParamLogGrpGet(char *pszBuf, struct kernel_param *pParam)
    1098 #endif
     1096static int vgdrvLinuxParamLogGrpGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
    10991097{
    11001098    PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
     
    11071105
    11081106/** log and dbg_log_flags parameter setter. */
    1109 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1110 static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, const struct kernel_param *pParam)
    1111 #else
    1112 static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, struct kernel_param *pParam)
    1113 #endif
     1107static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
    11141108{
    11151109    if (g_fLoggerCreated)
     
    11251119
    11261120/** log and dbg_log_flags parameter getter. */
    1127 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1128 static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, const struct kernel_param *pParam)
    1129 #else
    1130 static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, struct kernel_param *pParam)
    1131 #endif
     1121static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
    11321122{
    11331123    PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
     
    11401130
    11411131/** log and dbg_log_dest parameter setter. */
    1142 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1143 static int vgdrvLinuxParamLogDstSet(const char *pszValue, const struct kernel_param *pParam)
    1144 #else
    1145 static int vgdrvLinuxParamLogDstSet(const char *pszValue, struct kernel_param *pParam)
    1146 #endif
     1132static int vgdrvLinuxParamLogDstSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
    11471133{
    11481134    if (g_fLoggerCreated)
     
    11581144
    11591145/** log and dbg_log_dest parameter getter. */
    1160 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1161 static int vgdrvLinuxParamLogDstGet(char *pszBuf, const struct kernel_param *pParam)
    1162 #else
    1163 static int vgdrvLinuxParamLogDstGet(char *pszBuf, struct kernel_param *pParam)
    1164 #endif
     1146static int vgdrvLinuxParamLogDstGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
    11651147{
    11661148    PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
     
    11731155
    11741156/** r3_log_to_host parameter setter. */
    1175 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1176 static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, const struct kernel_param *pParam)
    1177 #else
    1178 static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, struct kernel_param *pParam)
    1179 #endif
     1157static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, CONST_4_15 struct kernel_param *pParam)
    11801158{
    11811159    g_DevExt.fLoggingEnabled = VBDrvCommonIsOptionValueTrue(pszValue);
     
    11841162
    11851163/** r3_log_to_host parameter getter. */
    1186 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    1187 static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, const struct kernel_param *pParam)
    1188 #else
    1189 static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, struct kernel_param *pParam)
    1190 #endif
     1164static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, CONST_4_15 struct kernel_param *pParam)
    11911165{
    11921166    strcpy(pszBuf, g_DevExt.fLoggingEnabled ? "enabled" : "disabled");
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r70624 r70625  
    403403        if (enc_id)
    404404#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
    405         return drm_encoder_find(connector->dev, NULL, enc_id);
     405                return drm_encoder_find(connector->dev, NULL, enc_id);
    406406#else
    407407                return drm_encoder_find(connector->dev, enc_id);
Note: See TracChangeset for help on using the changeset viewer.

© 2023 Oracle
ContactPrivacy policyTerms of Use