[PATCH] xf86drm: only include <sys/sysctl.h> for FreeBSD build case
Seung-Woo Kim
sw0312.kim at samsung.com
Thu Jan 9 09:32:10 UTC 2020
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 at samsung.com>
---
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
#include <sys/sysctl.h>
#endif
+#endif /* defined (__FreeBSD__) || defined (__FreeBSD_kernel__) */
#include <stdio.h>
#include <stdbool.h>
--
1.7.4.1
More information about the dri-devel
mailing list