From: Laurent Vivier <laurent@vivier.eu>
To: chengang@emindsoft.com.cn, riku.voipio@iki.fi
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v3] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION
Date: Thu, 28 May 2020 12:25:57 +0200 [thread overview]
Message-ID: <767ce983-c676-9d0b-3167-5165ceb48262@vivier.eu> (raw)
In-Reply-To: <20200523132442.22538-1-chengang@emindsoft.com.cn>
Le 23/05/2020 à 15:24, chengang@emindsoft.com.cn a écrit :
> From: Chen Gang <chengang@emindsoft.com.cn>
>
> Another DRM_IOCTL_* commands will be done later.
>
> Signed-off-by: Chen Gang <chengang@emindsoft.com.cn>
> ---
> configure | 18 +++++++++++
> linux-user/ioctls.h | 3 ++
> linux-user/syscall.c | 61 ++++++++++++++++++++++++++++++++++++++
> linux-user/syscall_defs.h | 15 ++++++++++
> linux-user/syscall_types.h | 11 +++++++
> 5 files changed, 108 insertions(+)
>
> diff --git a/configure b/configure
> index e225a1e3ff..2c2c489d1e 100755
> --- a/configure
> +++ b/configure
> @@ -3912,6 +3912,24 @@ EOF
> fi
> fi
>
> +#########################################
> +# libdrm check
> +
> +cat > $TMPC << EOF
> +#include <libdrm/drm.h>
> +#include <sys/ioctl.h>
> +int main(void)
> +{
> + struct drm_version version;
> + ioctl(-1, DRM_IOCTL_VERSION, &version);
> + return 0;
> +}
> +EOF
> +if ! compile_prog "" ; then
> + error_exit "libdrm check failed" \
> + "Make sure to have the libdrm/drm.h installed."
> +fi
You break the build of qemu if libdrm is not available, not a good idea.
In fact, you should only check for the include with something like
"check_include libdrm/drm.h" and then define a HAVE_DRM_H to use it
around the new code:
#ifdef HAVE_DRM_H
#include <libdrm/drm.h>
#endif
...
#ifdef HAVE_DRM_H
static inline abi_long target_to_host_drmversion(...
...
#endif
...
#ifdef HAVE_DRM_H
IOCTL_SPECIAL(DRM_IOCTL_VERSION,...
...
#endif
Thanks,
Laurent
next prev parent reply other threads:[~2020-05-28 10:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 13:24 [PATCH v3] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION chengang
2020-05-23 14:21 ` no-reply
2020-05-28 10:25 ` Laurent Vivier [this message]
2020-05-30 22:08 ` Chen Gang
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=767ce983-c676-9d0b-3167-5165ceb48262@vivier.eu \
--to=laurent@vivier.eu \
--cc=chengang@emindsoft.com.cn \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).