[vbox-dev] kernel 4.18 build fix
Michael Thayer
michael.thayer at oracle.com
Tue Sep 4 09:49:18 UTC 2018
Hello Both,
See https://www.virtualbox.org/changeset/74056/vbox
Regards and thanks.
Michael
03.09.2018 23:59, Sérgio Basto wrote:
> On Wed, 2018-08-29 at 16:11 +0000, Gianfranco Costamagna wrote:
>> Hello,
>>
>> Bug:
>> https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1787441
>>
>> /var/lib/dkms/virtualbox-guest/5.2.16/build/vboxsf/utils.c: In
>> function ‘sf_init_inode’:
>> /var/lib/dkms/virtualbox-guest/5.2.16/build/vboxsf/utils.c:165:28:
>> error: passing argument 1 of ‘sf_ftime_from_timespec’ from
>> incompatible pointer type [-Werror=incompatible-pointer-types]
>> sf_ftime_from_timespec(&inode->i_atime, &info->AccessTime);
>> ^~~~~~~~~~~~~~~
>> /var/lib/dkms/virtualbox-guest/5.2.16/build/vboxsf/utils.c:53:53:
>> note: expected ‘struct timespec *’ but argument is of type
>> ‘struct timespec64 *’
>>
>>
>> MIT licensed proposed fix:
>>
>> diff --git a/src/VBox/Additions/linux/sharedfolders/utils.c
>> b/src/VBox/Additions/linux/sharedfolders/utils.c
>> index 187ba2eff..11ff49a3a 100644
>> --- a/src/VBox/Additions/linux/sharedfolders/utils.c
>> +++ b/src/VBox/Additions/linux/sharedfolders/utils.c
>> @@ -50,7 +50,11 @@ static void sf_timespec_from_ftime(RTTIMESPEC *ts,
>> time_t *time)
>> RTTimeSpecSetNano(ts, t);
>> }
>> #else /* >= 2.6.0 */
>> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
>> static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
>> +#else
>> +static void sf_ftime_from_timespec(struct timespec64 *tv, RTTIMESPEC *ts)
>> +#endif
>> {
>> int64_t t = RTTimeSpecGetNano(ts);
>> int64_t nsec;
>> @@ -60,7 +64,11 @@ static void sf_ftime_from_timespec(struct timespec
>> *tv, RTTIMESPEC *ts)
>> tv->tv_nsec = nsec;
>> }
>>
>> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
>> static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec *tv)
>> +#else
>> +static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec64 *tv)
>> +#endif
>> {
>> int64_t t = (int64_t)tv->tv_nsec + (int64_t)tv->tv_sec * 1000000000;
>> RTTimeSpecSetNano(ts, t);
>>
>> cheers,
>
> Hello ,
>
> Kernel-4.18.5 is out there this is the official fix ? or where is the official ? please
>
>
> Thanks,
>
> --
>
> Sérgio M. B.
>
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev
>
--
Michael Thayer | VirtualBox engineer
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt
ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 2468 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20180904/62664200/attachment.bin>
More information about the vbox-dev
mailing list