[PATCH] gpu/cuda: Add missing stdlib include

John Romein romein at astron.nl
Tue Sep 12 19:08:43 CEST 2023


getenv needs stdlib.h to be included.

Bugzilla ID: 1133

Fixes: 24c77594e08f ("gpu/cuda: map GPU memory with GDRCopy")
Signed-off-by: John Romein <romein at astron.nl>
---
  drivers/gpu/cuda/gdrcopy.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/cuda/gdrcopy.c b/drivers/gpu/cuda/gdrcopy.c
index 322a5dbeb2..f19ad396f1 100644
--- a/drivers/gpu/cuda/gdrcopy.c
+++ b/drivers/gpu/cuda/gdrcopy.c
@@ -2,6 +2,8 @@
   * Copyright (c) 2022 NVIDIA Corporation & Affiliates
   */

+#include <stdlib.h>
+
  #include "common.h"

  #ifdef DRIVERS_GPU_CUDA_GDRCOPY_H
-- 
2.39.3




More information about the dev mailing list