All of lore.kernel.org
 help / color / mirror / Atom feed
From: Levend Sayar <levendsayar@gmail.com>
To: eagostini@nvidia.com
Cc: dev@dpdk.org, Levend Sayar <levendsayar@gmail.com>
Subject: [PATCH] gpu/cuda: fix getenv related build error
Date: Thu,  3 Aug 2023 19:25:12 +0300	[thread overview]
Message-ID: <20230803162512.41396-1-levendsayar@gmail.com> (raw)

If gdrapi.h is available, meson sets DRIVERS_GPU_CUDA_GDRCOPY_H as 1.
This causes gdrcopy.c build to give an error;
because compiler can not find signature of getenv.
stdlib.h is included for the definition of getenv function.

Fixes: ca12f5e8a7db ("gpu/cuda: mark unused GDRCopy functions parameters")

Signed-off-by: Levend Sayar <levendsayar@gmail.com>
---
 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..bd56b73ce4 100644
--- a/drivers/gpu/cuda/gdrcopy.c
+++ b/drivers/gpu/cuda/gdrcopy.c
@@ -6,6 +6,8 @@
 
 #ifdef DRIVERS_GPU_CUDA_GDRCOPY_H
 
+#include <stdlib.h>
+
 static void *gdrclib;
 static gdr_t (*sym_gdr_open)(void);
 static int (*sym_gdr_pin_buffer)(gdr_t g, unsigned long addr, size_t size,
-- 
2.39.2 (Apple Git-143)


             reply	other threads:[~2023-08-03 16:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 16:25 Levend Sayar [this message]
2023-09-29 15:00 ` [PATCH] gpu/cuda: fix getenv related build error David Marchand
2023-10-05 12:42   ` Elena Agostini
2023-10-06 10:07 ` David Marchand
2023-10-06 19:45   ` Levend Sayar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230803162512.41396-1-levendsayar@gmail.com \
    --to=levendsayar@gmail.com \
    --cc=dev@dpdk.org \
    --cc=eagostini@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.