aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--x11/nvidia-driver/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index ee5708617ea0..4b478cdf1472 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -85,6 +85,12 @@ post-patch: .SILENT
${REINPLACE_CMD} -e '15s,^,#include <sys/priv.h>,' \
${WRKSRC}/src/nvidia_os.c
.endif
+# Switch from suser() to priv_check() API on recent -CURRENT
+.if ${OSVERSION} >= 800049
+ ${REINPLACE_CMD} -e \
+ 's/suser(CURTHREAD)/priv_check(CURTHREAD, PRIV_DRIVER)/' \
+ ${WRKSRC}/src/nvidia_os.c
+.endif
.if defined(WITH_FREEBSD_AGP)
${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \
${WRKSRC}/src/nv-freebsd.h