Re: [PATCH] xf86drm: only include <sys/sysctl.h> for FreeBSD build case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 2020년 01월 10일 00:18, Jani Nikula wrote:
> On Thu, 09 Jan 2020, Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx> wrote:
>> The <sys/sysctl.h> header is only required FreeBSD and GNU libc
>> 2.30 starts to warn about Linux specific <sys/sysctl.h> header
>> deprecation. Only include <sys/sysctl.h> for FreeBSD.
>>
>> Signed-off-by: Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx>
>> ---
>>  xf86drmMode.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/xf86drmMode.c b/xf86drmMode.c
>> index 207d7be..ff1d31d 100644
>> --- a/xf86drmMode.c
>> +++ b/xf86drmMode.c
>> @@ -42,9 +42,11 @@
>>  #include <stdint.h>
>>  #include <stdlib.h>
>>  #include <sys/ioctl.h>
>> +#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
>>  #ifdef HAVE_SYS_SYSCTL_H
> 
> Not that I know anything about this, but shouldn't you instead fix
> HAVE_SYS_SYSCTL_H definition in configure stage to only be enabled on
> FreeBSD?

That seems better even in the xf86drmMode.c, <sys/sysctl.h> is required
for sysctlbyname() called from drmCheckModesettingSupported() with
FeeBSD build macro.

Unfortunately, I am not the meson build expert so if there is someone to
fix, then I am okay. Anyway, I will try to fix with HAVE_SYS_SYSCTL_H.

Best Regards,
- Seung-Woo Kim

> 
> BR,
> Jani.
> 
>>  #include <sys/sysctl.h>
>>  #endif
>> +#endif /* defined (__FreeBSD__) || defined (__FreeBSD_kernel__) */
>>  #include <stdio.h>
>>  #include <stdbool.h>
> 

-- 
Seung-Woo Kim
Samsung Research
--

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux