Re: [Mesa-dev] [PATCH] loader: unconditionally include unistd.h and stdlib.h

2017-02-10 Thread Eric Engestrom
On Thursday, 2017-02-09 22:10:00 +, Emil Velikov wrote:
> From: Nicolai Hähnle 
> 
> Otherwise we would fail with "implicit declaration of function" geteuid
> and getenv respectively.
> 
> To trigger (re)move the libdrm.pc file and use the following:
> 
>  $ ./autogen.sh --disable-egl --disable-gbm --disable-dri \
> --with-dri-drivers=swrast --with-gallium-drivers=swrast
>  $ make
> 
> Cc: Vinson Lee 
> Cc: Nicolai Hähnle 
> Fixes: 3f462050c ("loader: Add an environment variable to override driver 
> name choice.

Missing ")

These are posix headers, so I'm assuming *BSD systems won't be affected?
Reviewed-by: Eric Engestrom 

> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99701
> v2: [Emil: handle stdlib.h add commit message]
> Signed-off-by: Emil Velikov 
> ---
> Vinson, Nicolai, I've reproduced the issue and this patch should resolve
> it completely.
> ---
>  src/loader/loader.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/loader/loader.c b/src/loader/loader.c
> index 4825151ad5..3b28a0e7db 100644
> --- a/src/loader/loader.c
> +++ b/src/loader/loader.c
> @@ -33,6 +33,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
>  #ifdef MAJOR_IN_MKDEV
>  #include 
>  #endif
> @@ -42,8 +44,6 @@
>  #include "loader.h"
>  
>  #ifdef HAVE_LIBDRM
> -#include 
> -#include 
>  #include 
>  #ifdef USE_DRICONF
>  #include "xmlconfig.h"
> -- 
> 2.11.0
> 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] loader: unconditionally include unistd.h and stdlib.h

2017-02-10 Thread Nicolai Hähnle

On 09.02.2017 23:10, Emil Velikov wrote:

From: Nicolai Hähnle 

Otherwise we would fail with "implicit declaration of function" geteuid
and getenv respectively.

To trigger (re)move the libdrm.pc file and use the following:

 $ ./autogen.sh --disable-egl --disable-gbm --disable-dri \
--with-dri-drivers=swrast --with-gallium-drivers=swrast
 $ make

Cc: Vinson Lee 
Cc: Nicolai Hähnle 
Fixes: 3f462050c ("loader: Add an environment variable to override driver name 
choice.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99701
v2: [Emil: handle stdlib.h add commit message]
Signed-off-by: Emil Velikov 
---
Vinson, Nicolai, I've reproduced the issue and this patch should resolve
it completely.


It seems weird to review my own patch. Looks good to me anyway, and 
thanks for figuring out a possible trigger :)


Nicolai


---
 src/loader/loader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/loader/loader.c b/src/loader/loader.c
index 4825151ad5..3b28a0e7db 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -33,6 +33,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #ifdef MAJOR_IN_MKDEV
 #include 
 #endif
@@ -42,8 +44,6 @@
 #include "loader.h"

 #ifdef HAVE_LIBDRM
-#include 
-#include 
 #include 
 #ifdef USE_DRICONF
 #include "xmlconfig.h"



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] loader: unconditionally include unistd.h and stdlib.h

2017-02-09 Thread Emil Velikov
From: Nicolai Hähnle 

Otherwise we would fail with "implicit declaration of function" geteuid
and getenv respectively.

To trigger (re)move the libdrm.pc file and use the following:

 $ ./autogen.sh --disable-egl --disable-gbm --disable-dri \
--with-dri-drivers=swrast --with-gallium-drivers=swrast
 $ make

Cc: Vinson Lee 
Cc: Nicolai Hähnle 
Fixes: 3f462050c ("loader: Add an environment variable to override driver name 
choice.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99701
v2: [Emil: handle stdlib.h add commit message]
Signed-off-by: Emil Velikov 
---
Vinson, Nicolai, I've reproduced the issue and this patch should resolve
it completely.
---
 src/loader/loader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/loader/loader.c b/src/loader/loader.c
index 4825151ad5..3b28a0e7db 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -33,6 +33,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #ifdef MAJOR_IN_MKDEV
 #include 
 #endif
@@ -42,8 +44,6 @@
 #include "loader.h"
 
 #ifdef HAVE_LIBDRM
-#include 
-#include 
 #include 
 #ifdef USE_DRICONF
 #include "xmlconfig.h"
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev