* [PATCH libdrm] configure: Fix the <sys/sysmacros.h> check
@ 2017-05-04 16:39 Adam Jackson
2017-05-04 17:46 ` Emil Velikov
0 siblings, 1 reply; 2+ messages in thread
From: Adam Jackson @ 2017-05-04 16:39 UTC (permalink / raw)
To: dri-devel
AC_HEADER_MAJOR only defines MAJOR_IN_SYSMACROS if major() is _not_
defined by <sys/types.h> alone. It is, but it warns, and that's ugly.
To fix this, push -Werror into CFLAGS when invoking AC_HEADER_MAJOR so
the warning makes the compilation test fail.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index e5158b7d..43fcf68f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,11 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_FUNC_ALLOCA
+save_CFLAGS="$CFLAGS"
+export CFLAGS="$CFLAGS -Werror"
AC_HEADER_MAJOR
+CFLAGS="$save_CFLAGS"
+
AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
# Initialize libtool
--
2.12.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH libdrm] configure: Fix the <sys/sysmacros.h> check
2017-05-04 16:39 [PATCH libdrm] configure: Fix the <sys/sysmacros.h> check Adam Jackson
@ 2017-05-04 17:46 ` Emil Velikov
0 siblings, 0 replies; 2+ messages in thread
From: Emil Velikov @ 2017-05-04 17:46 UTC (permalink / raw)
To: Adam Jackson; +Cc: ML dri-devel
On 4 May 2017 at 17:39, Adam Jackson <ajax@redhat.com> wrote:
> AC_HEADER_MAJOR only defines MAJOR_IN_SYSMACROS if major() is _not_
> defined by <sys/types.h> alone. It is, but it warns, and that's ugly.
> To fix this, push -Werror into CFLAGS when invoking AC_HEADER_MAJOR so
> the warning makes the compilation test fail.
>
> Signed-off-by: Adam Jackson <ajax@redhat.com>
> ---
> configure.ac | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index e5158b7d..43fcf68f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -54,7 +54,11 @@ AC_USE_SYSTEM_EXTENSIONS
> AC_SYS_LARGEFILE
> AC_FUNC_ALLOCA
>
> +save_CFLAGS="$CFLAGS"
> +export CFLAGS="$CFLAGS -Werror"
> AC_HEADER_MAJOR
> +CFLAGS="$save_CFLAGS"
> +
IIRC the Sun compiler supports (albeit undocumented) Werror if anyone
is using it. So this should be fine.
Reviewed-by: Emil Velikov <emil.velilkov@collabora.com>
-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-04 17:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 16:39 [PATCH libdrm] configure: Fix the <sys/sysmacros.h> check Adam Jackson
2017-05-04 17:46 ` Emil Velikov
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.